X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Wed, 9 Sep 2009 12:05:13 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: syntax for Cygwin bash invoking Win apps
Message-ID: <20090909160513.GB29151@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <796377.93249.qm@web30205.mail.mud.yahoo.com>  <f60fe000909090856q7ef9a3c1x3f54eeb6b13b0432@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <f60fe000909090856q7ef9a3c1x3f54eeb6b13b0432@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Wed, Sep 09, 2009 at 11:56:54AM -0400, Mark J. Reed wrote:
>On Wed, Sep 9, 2009 at 11:27 AM, Ziser, Jesse wrote:
>>>> $ cmd /c echo "\"abc\""
>>>> "\"abc\""
>>>>
>>>> # Wahhh?!
>>>>
>>>> Anyone who knows the explanation would make me very grateful. I've tried
>>>> this with other Windows apps too, and the same weirdness seems to occur.
>
>Larry Hall:
>>>All of the above is consistent with bash shell quoting.
>
>No, it's really not.  Those backslashes should be long gone by the
>time cmd.exe gets its arguments, yet it echoes them.  It seems that
>the Cygwin version of bash stops short before doing some of the work
>it normally does itself on other systems, assuming the executed
>command will have its command line run through the preprocessor in the
>Cygwin DLL.

Actually, I'd say that was cmd doing something funky.  It's hard to believe
that bash was actually special-casing cmd.exe.

cgf

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

