This is the mail archive of the
mailing list for the Cygwin project.
Passing double quotes to DOS
- From: Richard Gilbert <R dot Gilbert at sheffield dot ac dot uk>
- To: cygwin at cygwin dot com
- Date: Thu, 7 Feb 2002 10:48:16 +0000 (GMT Standard Time)
- Subject: Passing double quotes to DOS
- Organization: University of Sheffield
I need to be able to pass double quotes to a program running under NT4/DOS
but I cannot find a way of doing so. To illustrate the problem I have
written a trivial BAT file called e.bat which contains the single line
If I run it from a DOS shell with a double quoted parameter it echoes the
parameter with the double quotes intact, e.g.
C:>echo "abc" (<-- the BAT file echoes the command)
However, if I run this program from a bash shell (or tcsh) in the cygwin
environment, I cannot find a way of passing the double quotes to the
$ e.bat "abc"
$ e.bat "\"abc\""
$ e.bat '"abc"'
Note that both the last two result in the same command being passed to
the BAT file.
Can anybody tell me how to do it?
Corporate Information and Computing Services
University of Sheffield, Sheffield, S10 2TN, UK
Phone: +44 114 222 3028 Fax: +44 114 222 3040
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html