I am trying add an object to a json file using bash. for example below is the final result I am aiming for
{
....,
"publishConfig": {
"registry": "http://myapp.org:4873/"
}
}
So I am using the following bash command in a script
sed -i '$s/}/,\n"publishConfig":{\n\t"registry":"http://myapp.org:4873/"\n}\n}/' somefile.json
however I keep getting the following error
char 48: unknown option to 'm
can someone please help me out with this regex. Thanks in advance.