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: Cygwin (1.7.8 and other versions) problems with globbing when invoked from DOS/Windows with nested quotes


Larry Hall (Cygwin) sent the following at Friday, March 18, 2011 6:01 PM
>On 3/18/2011 2:39 PM, Alex Khripin wrote:
>> Short summary: getting nested quotes in an argument through to a
>> Cygwin process from DOS is problematic, and there does not seem to beif you must
>> any detailed spec for how to escape quotes correctly. Backslash
>> characters seem to be spuriously generated.
>
>If you're using a native Windows 'make' with a Cygwin shell, you're
>better off making your tools consistent. Quoting mechanisms for Windows
>do not align with those used by Cygwin/Linux/Unix, so things are already
>problematic. Passing in a DOS path to a Cygwin shell and expecting the
>output to be properly quoted for a Windows version of 'make' is just
>asking for trouble. So I'd recommend staying on one side of the fence or
>the other if you want to minimize headaches.

I agree totally with Larry.  However, if you must use a mixed environment,
consider trying to get the commands into a script or batch file, convert
line endings appropriately, and then run the script with
  $ C:\cygwin\bin\bash -c script
or
  C:\> "$(cygpath -u "${COMSPEC}")" /c batch.bat

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

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