Results 1 to 2 of 2
Thread: sed problem
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Oct 2011
Please could someone advise, how I can resolve the sed problem that I have.
I'm creating the following variable :
SAN_HOME_PROPERTY=`cat $BKUPDIR/environment.properties | grep SAN_HOME=`
this gives me the following value :
then, when i perform the SED command as per below :
sed "s/SAN_HOME=/\$\SAN_HOME_PROPERTY/g" $SAN_TOP/cfg/environment.properties
When I check the file - $SAN_TOP/cfg/environment.properties
the sed command enters the variable $SAN_HOME_PROPERTY, instead of entering the variable value SAN_HOME=/san/dev6/bin/REL1_BC0876_CD2011
How can I sed the value into the file from the variable ?
sed s/SAN_HOME=/"$SAN_HOME_PROPERTY"/g $SAN_TOP/cfg/environment.propertieslinux user # 503963