Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <4102A623.6090103@scytek.de>
Date: Sat, 24 Jul 2004 14:10:43 -0400
From: Volker Quetschke <quetschke@scytek.de>
Reply-To: cygwin@cygwin.com
User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Mangling of '\\' by cygwin dll
X-Enigmail-Version: 0.84.0.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig531645C4D7DE374C5D2DE3C2"
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.2.2 (mrelay3.uni-hannover.de [130.75.2.41]); Sat, 24 Jul 2004 20:10:53 +0200 (MEST)
X-Scanned-By: MIMEDefang 2.42
X-IsSubscribed: yes

--------------enig531645C4D7DE374C5D2DE3C2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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

--------------enig531645C4D7DE374C5D2DE3C2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBAqYnPTXJup+KeF0RAiU+AJwLB84F4YQNyK2cBog6IQwWyT4RYgCfRy3E
HX4fis6rczZBrKcJB0+HpJY=
=H4te
-----END PGP SIGNATURE-----

--------------enig531645C4D7DE374C5D2DE3C2--
