www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/14/10:46:00

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
Date: Thu, 14 Oct 2004 10:46:15 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: chere problem with network-share handling ?
Message-ID: <20041014144614.GB22814@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20041014120808 DOT 47154 DOT qmail AT web53405 DOT mail DOT yahoo DOT com>
Mime-Version: 1.0
In-Reply-To: <20041014120808.47154.qmail@web53405.mail.yahoo.com>
User-Agent: Mutt/1.4.1i

On Thu, Oct 14, 2004 at 05:08:07AM -0700, Dave wrote:
>OK, this appears to be an issue with quote processing. Here is a session,
>starting in a command prompt.
>
>-----
>C:\>c:\cygwin\bin\bash -l -c "cd '\\minime\music'; exec /bin/bash"
>/bin/bash: line 1: cd: \minime\music: No such file or directory
>
>Administrator AT minime ~
>$ cd '\\minime\music'
>
>Administrator AT minime //minime/music
>$ /bin/bash -l -c "cd '\\minime\music'; exec /bin/bash"
>/bin/bash: line 1: cd: \minime\music: No such file or directory
>
>Administrator AT minime ~
>$ cd "'\\minime\music'"
>bash: cd: '\minime\music': No such file or directory
>
>---- end ----
>First command shows behaviour of the full command as I would expect it to be
>evaluated from the shell menu. Response as reported.
>
>Second command shows that the bash shell can process the cd command correctly.
>
>Third command retries the full command from the bash shell, eliminating
>cmd/windows evaluations.
>
>Fourth command duplicates the double quoting used by the main command.
>
>To me this indicates that double '\' within ''' and '"' quotes are not
>preserved.
>
><quote man bash>
>Enclosing  characters  in  single quotes preserves the literal value of
>each character within the quotes.  A single quote may not occur between
>single quotes, even when preceded by a backslash.
>
>Enclosing  characters  in  double quotes preserves the literal value of
>all characters within the quotes, with the exception of $,  `,  and  \.
>The  characters  $  and  `  retain  their special meaning within double
>quotes.  The backslash retains its special meaning only  when  followed
>by one of the following characters: $, `, ", \, or <newline>.  A double
>quote may be quoted within double quotes by preceding it with  a  back-
>slash.
></quote>
>
>From this I would expect the double '\' to be preserved since it is within
>single quotes, whose special meaning is retained when within double quotes.
>
>It seems the double quote rules are overriding the single quote rules within the
>single quotes.
>
>Am I reading this right?

Yes.  Once you quote the outer thing with the "", the backslash interpolation
is done according to "" rules.

I guess I haven't been paying close attention.  Why are the slashes
getting changed to backslashes?  That's not right.  It should be using cygwin
paths.

cgf

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

- Raw text -


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