This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Mangling of '\\' by cygwin dll


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

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]