I am trying to replace a string from shell. I have already read the string and it's in template variable. Now I am trying to replace the companyId
which store in REPLACE_COMPANY
variable with the parameter passed in shell. I have tried few solution from net but didn't succeeded. Also I want to keep the file format intact as with replace I found all string comes into one line. Can anyone help.
REPLACE_COMPANY="companyId"
echo "$template"
##### Company: companyId CONFIG START #####
backend FE:spaces-companyId
redirect scheme https if !{ ssl_fc }
balance roundrobin
server 1-www spacesIp:80 check cookie s2
backend BE:synapse-companyId
redirect scheme https if !{ ssl_fc }
balance roundrobin
server 1-www synapseIp:8008 check cookie s2
##### Company: companyId CONFIG END #####