Dear Daniel,

Thanks very much for your example, it's exactly what I needed!

Paul


On 14 March 2011 17:41, Daniel Eggleston <[email protected]> wrote:
> You don't need to escape the spaces (try it - do exactly what cmiller did,
> without the backwhacks, and it will work fine).
>
> However, Paul's storing the data in a variable, and the double quotes get
> passed to the sed command verbatim, and sed can't handle the quotes.
>
> One easy solution is to use a couple of variables, instead of one:
>
> [ degglest@tavanasa : /net_home/degglest ]
> $ COMMAND='sed'; ARG='s/A B/1 2/'
> [ degglest@tavanasa : /net_home/degglest ]
> $ echo "A B" | $COMMAND "$ARG"
> 1 2

-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup

Reply via email to