The following is an extroct from a json file, that I have:
},
{
"name": "asdasd",
"script": "dsad.js",
"merge_logs": ture,
"error_file": "/ofghfghgfh.log",
"out_file": "/fghgfhfgg",
"cwd": "",
"autorestart": true,
"log_date_format" : "YYYY-MM-DD HH:mm Z",
"env": {
"NODE_ENV": "desa",
"KEY": "VtZOiz0Qc4afFs6j+h2r"
}
}]
I want to add a phrase after "KEY": substituting the value that it has now.
I tried "sed" but I added it to the end of the line
sed '/KEY/s/$/1234/g' .json
I would need to use the "-i" option to change the file directly.