bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sed? escaping back slash


From: Craig Allsop
Subject: Re: sed? escaping back slash
Date: Sat, 10 Mar 2001 13:10:03 +1000

"Hans-Bernhard Broeker" <address@hidden> wrote in message
news:address@hidden
> Craig Allsop <address@hidden> wrote:
> > echo test | sed "s/test/\\/"
>
> > Under 4dos shell in Win98, Cygwin GNU version v1.18 gives: \
> > Under 4dos shell in Win98, Cygwin GNU version v3.02 gives: char 9:
> > Unterminated 's' command
>
> [Didn't you ask the same thing a few weeks ago, already???]

Sorry, I wasn't aware that the message would end up here when I emailed
gnu-bug.

> The problem you see may not actually be in 'sed', but rather in your
> shell.  In particular, the command line quoting behaviour of your
> shell may cause all kinds of strange artifacts. In case of doubt, you
> should do this kind of check with a sed script stored in a file, not
> with one given on the command line.

Thanks for pointing out the shell quoting, it all makes complete sense now.

I agree, a script file would eliminate almost all doubt in sed but what
about its command line parsing? Of course the shell does translate these
characters so neither program is at fault, only my command line is at fault.
:)

Craig.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]