Can I get some help on this please, I have looked at the many post with similar questions and have tried the solutions and they are not working for my scenario which is:
I have a text file (myfile) that contains
b_log=$g_log/FILENAME.log
echo "Begin processing file FILENAME " >> $b_log
I have a script which contains a variable and tries to replace the string FILENAME in myfile with the value of var with the following commands:
var=/mydir/areally/really/really/deep/dir/structure/myfile.dat
perl -pi -e "s/FILENAME/\${var}/g" myfile
after I run the script the string FILENAME is removed but the value in var is not inserted.
