Hello everybody,
I have a Problem with sed command.
I want to replace a defined string with a string from a database field (dynamic).
e.g.
sed -i -e 's/%NAME%/'"$HNAME"'/g'
The Problem is that the $HNAME variable can contain Special characters like '&'
e.g.
HNAME="AH Kruger & Co. KG"
so I get the Output
"AH Kruger %NAME% Co. KG"
sed replace the ampersand with the searchstring.
Is it possible to tell sed not to modify the replacestring?
Thx for your help...
PS: Sorry for my bad english...