Im having problems using SED to replace with a variable. I assume the problem is that the variable contains spaces.
data=$(grep 'DATA' vsm.scr)
sed "s/loc/$data/g" v1.scr > v2.scr
I just did the echo to make sure my variable is correct which it is. It has the format below:
(There are additional spaces in front of DATA, they dont show up in the forum post)
Ive tried setting the variable as a simple number and everyhting works fine, which leads me to believe its a problem with the spaces