delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/09/22/15:28:36

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <423515.75200.qm@web30205.mail.mud.yahoo.com>
Date: Tue, 22 Sep 2009 12:28:25 -0700 (PDT)
From: "Ziser, Jesse" <xezlec AT yahoo DOT com>
Subject: Re: syntax for Cygwin bash invoking Win apps
To: cygwin AT cygwin DOT com
In-Reply-To: <524600.35389.qm@web30208.mail.mud.yahoo.com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

More strange behavior when running Cygwin apps from a Windows prompt.  The quoting seems not to follow any rules that I can manage to track down:

The following are normal and expected, given that we discovered that all Cygwin apps do some kind of as-yet-undefined partial bash preprocessing on their arguments:

C:\> d:\cygwin\bin\echo \
\

C:\> d:\cygwin\bin\echo \\
\\

C:\> d:\cygwin\bin\echo 'a'
a

C:\> d:\cygwin\bin\echo '\a'
\a

The following don't seem to make any sense, even given that Cygwin apps do some kind of preprocessing on their arguments:

C:\> d:\cygwin\bin\echo '\'
'

C:\> d:\cygwin\bin\echo '\\'
\

C:\> d:\cygwin\bin\echo '\\\n'
[*** 15-second pause, every time! ***]
\\n

I have now given up on directly invoking Cygwin apps from Windows.  It seems it just can't be done with any consistency at all.  Instead, I'm going to try generating temporary shell scripts and executing them another way.  However, since the above may reveal a bug (especially the 15-second pause), I thought I should mention it to you folks.

Thanks,
Jesse



      

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019