I have tried the following on the command line and they work, but when I place them in a bash script I get an error (see below):
sed -e "s/INSERT_ME_HERE/"${ROOT_BUILD_HOME}"/g" ./Doxyfile > ./tmp && mv ./tmp ./Doxyfile
sed -e "s/INSERT_ME_HERE/'${ROOT_BUILD_HOME}'/g" ./Doxyfile > ./tmp && mv ./tmp ./Doxyfile
sed -e "s/INSERT_ME_HERE/`echo ${ROOT_BUILD_HOME}`/g" ./Doxyfile > ./tmp && mv ./tmp ./Doxyfile
The error I am getting is:
sed: -e expression #1, char 19: unknown option to `s'
However like I said I am using it from the command line and it works:
[mehoggan@hogganz400 Doxygen]$ ROOT_BUILD_HOME=MONKEY; sed -e "s/INSERT_ME_HERE/`echo ${ROOT_BUILD_HOME}`/g" ./Doxyfile | grep MONKEY
INPUT = MONKEY
Why does it work under one case and not the other?
Also ROOT_BUILD_HOME is set, I echo it right before the sed expression within the shell script.
echo `date`: "Going to run doxygen on source and move to ${ROOT_BUILD_HOME}";
./tmpyou should givemktempa try for such tasks since it improves the security and robustness of your scripts.