I am (unsuccessfully) trying to substitute the database host entry in a Magento local.xml file (the connection string file).
The line is the following:
<host><![CDATA[localhost]]></host>
I want to find the line that contains "host" with sed and then replace the content of the inner brackets with something else.
Note - the content of the inner brackets won't always be "localhost", so s/localhost/lala/g won't work.
I got to the following:
sed -i "/\<host\>/s/.../lala/2" local.xml
Help please.