Hi,
I am trying to use 3 sed statements in a shell script, but it get foll error.
sed : garbage after command.
If I use only two sed statements, the script works well.
Is there any restriction for sed usage or is there some catch which I am missing.
Sample Script is as follows :
instance=a
pattern=b
filename=/opt/gate/test.txt
line="Some INSTANCE PATTERN LOGFILENAME"
line1=`echo $line | sed -e "s/INSTANCE/${instance}-${pattern}/g"`
line2=`echo $line1 | sed -e "s/PATTERN/${pattern}/g"`
line3=`echo $line2 | sed -e "s/LOGFILENAME/${filename}/g"`
echo $line3 >> ./${pattern}-${instance}.cfg
Any help is highly appreciated
Thanks,
Sameer Salve