[nylug-talk] noob bash sed confusion
jh
Thu Nov 2 18:33:42 EST 2006
I'm trying to use sed in bash, and i'm getting rather confused with
quotes and escapes. I'm hoping that someone can help...
OK, this works fine from the bash prompt:
sed -e 's/source\ src\ {/source\ src\
{unix-stream("\/home\/foo2\/dev\/log");/g' file.txt
I'd like to do the same thing, but use a variable for the replace
argument instead of foo2. How can I do this within a bash script?
Thanks
jh
More information about the nylug-talk
mailing list