This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Passing double quotes to DOS
- From: ÐÑÑÑ Ð. <satnatantas at gmail dot com>
- To: cygwin <cygwin at cygwin dot com>
- Date: Mon, 4 May 2015 00:05:10 +0400
- Subject: Re: Passing double quotes to DOS
- Authentication-results: sourceware.org; auth=none
- References: <CA+Ni7jNBd0WZu37OMiPEyvxwkgvYnDfonKoLjpuvNrZ95A9Rbw at mail dot gmail dot com>
https://cygwin.com/ml/cygwin/2002-02/msg00336.html
There was a statement saying that cygwin does everything to preserve double
quotes.
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.
If I type
cmd /c mklink "path" "filename"
cmd.exe is called without doubleqoutes (I use ProcExp to see cmd line).
If I type same thing in "Run" dialog of TaskManager, doublequotes are
passed as intended.
If I type
cmd /c mklink \"path\" \"filename\"
reverse slash spills to cmd line.
If I type
cmd /c mklink "\"path\"" "\"filename\""
reverse slash and all doubleqoutes spill to cmd line.
I really do not get it. How do I pass doubleqoutes to CMD? Problem is
not related to mklink or any internals of CMD and even bash - Cygwin
does not pass doubleqoutes instead.
Example:
echo "\"bbb\""
cmd /c echo "\"bbb\""
There must be an error somewhere on the CYGWIN/Windows boundary.
Can I somehow whitelist "cmd.exe" so it does not get special treatment?
CYGWIN_NT-6.1 USER 1.7.33-2(0.280/5/3) 2014-11-13 15:47 x86_64 Cygwin
--
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