i am trying to replace $old string with $new string in file where:
old=ESX_10.1.1.1\@11.11.11.11
new=host_15_11_0_111.static
I am using sed command:
sed i "s/${old}/${new}/g" /filename
but it does not replace the word and also not shows any error. I have tried it with many ways, like replacing:
sed i "s,${old},${new},g" /filename
and
sed i "s=${old}=${new}=g" /filename
but it does not work. Help me to solve this
sed ior is that a typo forsed -i? 2. Did you have write access to/to create a temporary file and then rename it as/filename?