Hi all,
I have been having problems with this for a while now and thought I'd see if anyone else had some ideas. I'm trying to update a file with the value $shouldbe and save the file. Can anyone give me the correct syntax for this?
So far I have...
shouldbe='$var1=":0";'
checked=`grep '$var1=' somefile.pl`
echo $checked
echo $shouldbe
if [ "$checked" != "$shouldbe" ]; then
sed -e "s/$checked/$shouldbe/g" need to finish command
else
echo $checked
fi
Thanks for any help!
Nick