```
port.properties
{
  "port":3006
  "name":"John"
}

```

changeport.sh

```
filename="port.properties"
oldport=$(awk -F'"port":|,' '{i=$2;print i}'  "$filename")
read newport
oldport_str="\"port\":$oldport"
newport_str="\"port\":$newport"

sed -i "s/$oldport_str/$newport_str/g" "$filename"

```

I don't know about the error.If you have the answer,please tell me,thanks