public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Passing double quotes to DOS
@ 2002-02-07  2:48 Richard Gilbert
  2002-02-07  3:17 ` Pavel Tsekov
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Gilbert @ 2002-02-07  2:48 UTC (permalink / raw)
  To: cygwin

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

echo %1

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:>e.bat "abc"
C:>echo "abc"	(<-- the BAT file echoes the command)
"abc"

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

$ e.bat "abc"
C:>echo abc
abc

(as expected)

$ e.bat "\"abc\""
C:>echo "\"abc\""
echo "\"abc\""

$ e.bat '"abc"'
C:>echo "\"abc\""
echo "\"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?

TYIA.

--
Richard Gilbert
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
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <CA+Ni7jNBd0WZu37OMiPEyvxwkgvYnDfonKoLjpuvNrZ95A9Rbw@mail.gmail.com>]

end of thread, other threads:[~2015-05-05 13:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-07  2:48 Passing double quotes to DOS Richard Gilbert
2002-02-07  3:17 ` Pavel Tsekov
2002-02-07  3:30   ` Richard Gilbert
2002-02-07  8:21     ` Pavel Tsekov
     [not found] <CA+Ni7jNBd0WZu37OMiPEyvxwkgvYnDfonKoLjpuvNrZ95A9Rbw@mail.gmail.com>
2015-05-03 20:06 ` Пётр Б.
2015-05-03 20:10   ` Пётр Б.
2015-05-03 20:11     ` Пётр Б.
2015-05-03 20:21 ` Пётр Б.
2015-05-05 14:47   ` cyg Simple

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).