I want to replace some text in a variable by another variable.
body='{ "server": {
"metadata": "metaToReplace"
}
}'
meta="{
ARTS_ORACLE_INT_IP: 10.120.47.151,
ARTS_USER: performance
}"
I tried this, but didn't work:
body=$(echo "${body}" | sed "s|\"metaToReplace\"|${meta}|g")
I got this error :
sed: -e expression #1, char 19: unterminated `s' command