sed with bash variables
I am trying to run sed from a bash script to replace a value in a string with a bash variable.
Essentially, Code:
MYVAR="cabbage" Can anyone suggest how I can get this to work? |
Hi,
From within a (bash) script you need to use double quotes instead of singel qoutes to expand the variable. I.e: Code:
MYVAR="cabbage" |
Re: sed with bash variables
Quote:
Code:
sed -e 's/lettus/'$MYVAR'/' regards slackie1000 |
All times are GMT -5. The time now is 06:09 PM. |