delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/05/05/09:22:00

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:references:in-reply-to:subject:date
:message-id:mime-version:content-type:content-transfer-encoding;
q=dns; s=default; b=pRS7LcOZ98r3tZsbLHbzgymJSoOgWW4Cnll4fK6k0Dt
/7VwBwmolvkSomop8gPDvJs0GbHxaa5aceh8LoVayZCTvzjGGenGV3CgnKihxO2x
5PX5GDFxei16niNH+mQHN15p/jzrrDTZs3N6ewlCsl75eQRMvSfuHHP1U4xcZayE
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:references:in-reply-to:subject:date
:message-id:mime-version:content-type:content-transfer-encoding;
s=default; bh=N9U9RThaUc9fcy7pOadBF7w4Vkg=; b=GBjaPyN/oycrXm3JB
hpm8drRSVrOimj8s1j7OqloMTj2ZRD7jcCF4O31aRTnsIuZ+CrMSIHdLr0h/y4cy
3K+4gSa+3X4YTbHmC67rpL6oloyiBr8CbkLVQ/Jc5zugTqFfBkdToibxWZvI3/aP
L1WSmEeSMOJ7SV9JlAztHkqCLQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-qg0-f43.google.com
X-Received: by 10.55.20.2 with SMTP id e2mr37140658qkh.52.1430832093225; Tue, 05 May 2015 06:21:33 -0700 (PDT)
From: "cyg Simple" <cygsimple AT gmail DOT com>
To: <cygwin AT cygwin DOT com>
References: <CA+Ni7jNBd0WZu37OMiPEyvxwkgvYnDfonKoLjpuvNrZ95A9Rbw AT mail DOT gmail DOT com> <CA+Ni7jORNM-kSMYBwFcVgJ_6fxz=_Hi0TzwcVcpgqw3pp7GEOQ AT mail DOT gmail DOT com>
In-Reply-To: <CA+Ni7jORNM-kSMYBwFcVgJ_6fxz=_Hi0TzwcVcpgqw3pp7GEOQ@mail.gmail.com>
Subject: RE: Passing double quotes to DOS
Date: Tue, 5 May 2015 09:21:34 -0400
Message-ID: <044901d08736$695890a0$3c09b1e0$@gmail.com>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t45DLu7o003543

> 
> There was a statement saying that cygwin does everything to preserve double
> quotes.
> 


Where is that statement?

> It does not. I was recently doing some symbolic links with "cmd /c mklink "path"
> "filename" " recently and it was fine until I had a file with ampersand.
> 

It isn't Cygwin but the shell semantics that parse the double quotes.

> If I type
> cmd /c mklink "path" "filename"
> 
> cmd.exe is called without doubleqoutes (I use ProcExp to see cmd line).
> 

Because the shell (e.g. bash) processes the data within the quotes; that isn't Cygwin and would happen in any *NIX shell.  Use:

cmd /c mklink '"path"' '"filename"'

instead.  Note the ' before and after (dependent on left or right values) the ".

--
cyg Simple


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019