I have the next file test.txt with content:
- name: MONGODB_HOST
value: {{MONGODB-HOST}}
I want to replace {{MONGODB-HOST}} with this env variable:
MONGODB_HOST=server.dev.example,server2.dev.example
Command is:
/bin/sed -i 's,{{MONGODB-HOST}},'"$(MONGODB_HOST)"',' "test.txt";
And it fails:
/bin/sed: -e expression #1, char 56: unknown option to `s'
If I leave:
MONGODB_HOST=server.dev.example
it works. Can you help me find the reason why it is failing?
/bin/sed
AFAIK, justsed
is fine. – schrodingerscatcuriosity Feb 29 '20 at 14:59