Folks,
I've been trying to use the ENV variable with slashes(/) in its value inside the sed substitution..
Sed 's/myval/'$MYVAL'/' file1 >> file.tmp
If MYVAL=<sometext>, it works.
if MYVAL=/home/venkat, it doesnt.
***************************
bash-2.05$ export VAL=/home/venkat
bash-2.05$ sed 's/myval/'$VAL'/' file1
sed: command garbled: s/myval//home/venkat/
bash-2.05$
*****************************
I know that we generally escape the / using \, but here the value being substitued during run-time.