Hello All,
I am trying to replace a string in multiple files using sed but its not fully doing what I am trying to.
say I have myvariable=blah blah in multiple files, the value of myvariable is different in different files. I want to replace whatever the value of myvariable to TEMP1.
I tried
sed 's/myvariable=/myvariable=TEMP1/g' file1 > file1.new
but the result in file1.new was
myvariable=TEMP1blah blah
I need just myvariable=TEMP1
any help is appreciated.
I am trying to replace a string in multiple files using sed but its not fully doing what I am trying to.
say I have myvariable=blah blah in multiple files, the value of myvariable is different in different files. I want to replace whatever the value of myvariable to TEMP1.
I tried
sed 's/myvariable=/myvariable=TEMP1/g' file1 > file1.new
but the result in file1.new was
myvariable=TEMP1blah blah
I need just myvariable=TEMP1
any help is appreciated.