Globally replace a placeholder with sed


sed -i [replace command] file

E.g.

sed -i s/MINISHIFT_IP/192.168.42.1/g my-config-file.yml

You can even do:

sed -i s/MINISHIFT_IP/$(minishift ip)/g my-config-file.yml

More info about sed:
https://www.gnu.org/software/sed/manual/sed.txt

Advertisements