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

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

sed


From: Craig Allsop
Subject: sed
Date: Thu, 1 Mar 2001 14:58:41 +1000

Hi.

Is this the correct behaviour?

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

echo test | sed "s/test/\\\/"

Gives: \

Furthermore, if I wanted two back slashes in my replacement string, I try:

echo test | sed "s/test/\\\\/"

This results in only one slash. I need to use seven (?) backslashes to get
just two in my substitution.

Under Linux, GNU sed version 2.05 same problem.
Under Linux, GNU sed version 3.02 same problem.

As far as I can see in the documentation, I need only supply one back slash
to escape a backspace in the replacement string.

Craig.
Lead Programmer - AURAN Jet.
www.auranjet.com


Auran disclaims responsibility for the contents of this e-mail unless it was
expressly authorised by Auran.  This e-mail is a confidential communication.
To the extent permitted by law, Auran does not accept any liability for any
loss or damage suffered or incurred by you as a result of receiving, opening
or relying on this e-mail. 





reply via email to

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