i am having trouble replacing the modified date in my script via sed.
I am getting the last modified date like this:
olddate=`grep -m1 \"Built \" script.
use sed "s#$olddate#$newdate#g"
sed "s#$olddate#$newdate#g"
that should work
Use , instead of / !
sed -i "" "s,$olddate,$newdate,g" script.sh
In fact you can use almost any char as separators.
You can use separators other than slashes, for instance ";"
sed -i "" "s;$olddate;$newdate;g" script.sh