Mangling of '\\' by cygwin dll
Volker Quetschke
quetschke@scytek.de
Sat Jul 24 21:34:00 GMT 2004
Hi,
I run into a strange problem while using sed from a cmd.exe shell.
The problem is not sed specific and the following lines demonstrate
it with /bin/echo.
From cmd.exe:
C:\>\cygwin\bin\echo.exe '1 \ 2 \\ 3 \\\ 4 \\\\ 5 \\\\\ 6 \t'
1 \ 2 \ 3 \\ 4 \\ 5 \\\ 6 \t
It looks like each \\ is translated into \. Like escaping for
special characters, but it doesn't happen for single \.
This effect doesn't happen in bash:
$ /bin/echo.exe '1 \ 2 \\ 3 \\\ 4 \\\\ 5 \\\\\ 6 \t'
1 \ 2 \\ 3 \\\ 4 \\\\ 5 \\\\\ 6 \t
Bug or feature? I didn't find anything about this in
<http://cygwin.com/cygwin-ug-net/using-specialnames.html>.
Ah, yes,
$ uname -s -r
CYGWIN_NT-5.1 1.5.10(0.116/4/2)
Volker
--
PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net
key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20040724/d5aa5954/attachment.sig>
More information about the Cygwin
mailing list