I need to replace a string with contents of a json file. So my code goes like
value=$(<minified.json)
sed -i -e "s/<!--MyJson-->/$value/" file.html
I need to replace the contents of json file to <!--MyJson-->
string in file.html.
Issue happens because some array elements in json have /
so because of that it fails with error
sed: -e expression #1, char 438: unknown option to `s'
But I cant change that text in json. So how can i make my sed command to ignore the backslash in the copy text. Or how can i make it as a blind replace.
Please help