From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4812 invoked by alias); 7 Feb 2002 10:48:36 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Received: (qmail 4388 invoked from network); 7 Feb 2002 10:48:27 -0000 Received: from unknown (HELO mailhub2.shef.ac.uk) (143.167.2.154) by sources.redhat.com with SMTP; 7 Feb 2002 10:48:27 -0000 Received: from pc016105.shef.ac.uk ([143.167.16.105]) by mailhub2.shef.ac.uk with esmtp (Exim 3.22 #10) id 16Ym6M-0005sa-00 for cygwin@cygwin.com; Thu, 07 Feb 2002 10:48:26 +0000 Date: Thu, 07 Feb 2002 02:48:00 -0000 From: Richard Gilbert To: cygwin@cygwin.com Subject: Passing double quotes to DOS Message-ID: Organization: University of Sheffield X-X-Sender: cs1jrg@impala.shef.ac.uk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-02/txt/msg00314.txt.bz2 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/