This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: chere problem with network-share handling ?

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@minime ~
$ cd '\\minime\music'

Administrator@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@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

<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-

>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?


Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]