Hi there,
I'm really getting crazy to get the following done (linux):
Code:
sed -e "s/$old/$new/g" $origfile > $newfile
mv $newfile $origfile
The variables are clean and available in my script. No prob.
$old is an IP-address of a server, $new as well. replacement-file is an xml-file (the ip-address to be changed is within an xml-tag).
It should be trivial, but it isn't. I spent the last 3 hours reading about the problem, trying several different 'solutions' or workarounds.
It should work, the '"' should take care that the variables get expanded, but whatever I try the old server IP isn't replaced.
Plz, I need help. Any idea, anybody?
Regards,
jomann.