stanhubble
MIS
problem .... file with lines in the form of :
TAG_NAME="value1 value2 value3"
and i want to replace the line with:
TAG_NAME="value1 value2 value4 value5 value6"
(note the spaces and the quotes)
i can parse things out such that i have and var $ENV1 with
value1 value2 value3
in it and var $ENV2 with
value1 value2 value4 value5 value6
in it
I have tried a number of variants with sed that don't seem to work
sed -i 's/${ENV1}/${ENV2}/g' $CFGFILE
sed -i 's/'${ENV1}'/'${ENV2}'/g' $CFGFILE
i have also tried the /c change command
and i think its the spaces that are screwing me up.
i and not getting any errors, just the change is not happening.
is sed the right tool to be trying this with?
TAG_NAME="value1 value2 value3"
and i want to replace the line with:
TAG_NAME="value1 value2 value4 value5 value6"
(note the spaces and the quotes)
i can parse things out such that i have and var $ENV1 with
value1 value2 value3
in it and var $ENV2 with
value1 value2 value4 value5 value6
in it
I have tried a number of variants with sed that don't seem to work
sed -i 's/${ENV1}/${ENV2}/g' $CFGFILE
sed -i 's/'${ENV1}'/'${ENV2}'/g' $CFGFILE
i have also tried the /c change command
and i think its the spaces that are screwing me up.
i and not getting any errors, just the change is not happening.
is sed the right tool to be trying this with?