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: | <4107B6E4.2010108@scytek.de> |
Date: | Wed, 28 Jul 2004 16:23:32 +0200 |
From: | Volker Quetschke <quetschke AT scytek DOT de> |
Reply-To: | cygwin AT cygwin DOT com |
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> <410406E0 DOT 2000402 AT scytek DOT de> <20040728084033 DOT GC12700 AT cygbert DOT vinschen DOT de> |
In-Reply-To: | <20040728084033.GC12700@cygbert.vinschen.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]); Wed, 28 Jul 2004 16:23:43 +0200 (MEST) |
X-Scanned-By: | MIMEDefang 2.42 |
X-IsSubscribed: | yes |
--------------enig96A02DF8F6CC0697DB1C61E8 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi Corinna, >>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? > > Quotes are not treated specially in cmd. But they are used in Cygwin > to allow applications called from cmd to get values which are otherwise > difficult to transport. The rules are fairly simple and match your > obvservations. A backslash is always a special character. So a real > backslash has to be written as \\, the quoting character itself as > either \' or \", whatever you used for it. That's it, basically. So > your example '\\\' is treated as an unfinished quote with two characters, > a backslash and a single quote. Thanks, yes my small sed problem showed me that I also had to escape the used \s in that file even though the single \ was conserved it somehow confused sed. Consequently using \\ fixes this. Volker -- If you like my work consider: http://www.scytek.de/donations.html PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D --------------enig96A02DF8F6CC0697DB1C61E8 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 iD8DBQFBB7bnPTXJup+KeF0RAj0kAJ4on2WK0cmvKxguLJDaiXqIGEX2fQCgqyH0 1ypCKdkXYvHpa8dlN2EKE4Q= =hll0 -----END PGP SIGNATURE----- --------------enig96A02DF8F6CC0697DB1C61E8--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |