delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <410406E0.2000402@scytek.de> |
Date: | Sun, 25 Jul 2004 15:15:44 -0400 |
From: | Volker Quetschke <quetschke AT scytek DOT de> |
User-Agent: | Mozilla Thunderbird 0.6 (Windows/20040502) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Mangling of '\\' by cygwin dll |
References: | <4102A623 DOT 6090103 AT scytek DOT de> |
In-Reply-To: | <4102A623.6090103@scytek.de> |
X-Enigmail-Version: | 0.84.0.0 |
X-Enigmail-Supports: | pgp-inline, pgp-mime |
X-Greylist: | Sender IP whitelisted, not delayed by milter-greylist-1.2.2 (mrelay3.uni-hannover.de [130.75.2.41]); Sun, 25 Jul 2004 21:15:55 +0200 (MEST) |
X-Scanned-By: | MIMEDefang 2.42 |
X-IsSubscribed: | yes |
--------------enig51B51D9EA1F1268EF3D81AF3 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. The following mini program also demonstrates that it comes from the cygwin dll. -- slashtest.c -- #include <stdio.h> int main(int argc, char *argv[]) { printf("Arg1:%s:\n",argv[1]); return 0; } -- slashtest.c end -- Compile it with "gcc slashtest.c -o slashtest_cyg.exe" and "gcc -mno-cygwin slashtest.c -o slashtest_w32.exe" and try the following from a cmd.exe: C:\cygwin\bin>\cygwin\home\quetschke\slashtest_w32.exe '\\\' Arg1:'\\\': _nothing done for a native binary, the quotes stay_ C:\cygwin\bin>\cygwin\home\quetschke\slashtest_cyg.exe '\\\' Arg1:\': _Hmm, one \ escaped and one ' escaped, quotes vanish if not escaped._ C:\cygwin\bin>\cygwin\home\quetschke\slashtest_cyg.exe \\\ Arg1:\\\: _Nothing special for a non-quoted string._ What is the deeper plan for this functionality? Volker -- PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D --------------enig51B51D9EA1F1268EF3D81AF3 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 iD8DBQFBBAblPTXJup+KeF0RAldwAKChhn4UDUWALS6lIc+m9/+29FSHHACfYXTl cA3potWJ+qAJAUU/6a1FIqk= =1ZHL -----END PGP SIGNATURE----- --------------enig51B51D9EA1F1268EF3D81AF3--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |