Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
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
Reply-To: Cygwin List <cygwin@cygwin.com>
Message-Id: <6.1.0.6.0.20040902145655.033a0b60@pop.prospeed.net>
X-Sender: 
Date: Thu, 02 Sep 2004 15:01:49 -0400
To: Sean Daley <spdaley@gmail.com>, cygwin@cygwin.com
From: Larry Hall <lh-no-personal-replies-please@cygwin.com>
Subject: Re: Re: Problem executing a .bat script in a directory with spaces using bash
In-Reply-To: <5c8adab70409021123291886c7@mail.gmail.com>
References: <5c8adab704090207557a3a359a@mail.gmail.com> <4137566C.7070203@sbcglobal.net> <5c8adab704090210405ea696e4@mail.gmail.com> <413760BD.2080504@sbcglobal.net> <5c8adab70409021123291886c7@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

At 02:23 PM 9/2/2004, you wrote:

<snip>



>Now let's take this one step further.  In the last case, it actually
>thinks it wants
>to execute C:\Space instead of the script.  Now let's do the following:
>Create a batch script called "C:\Space.bat" and put one line into it.
>cat /etc/passwd.
>
>Now re-run the third command again:
>$ /cygdrive/c/Space\ Dir/test.bat "hello world"
>c:\Space Dir>cat /etc/passwd
><etc/passwd file is now displayed>
>
>This just doesn't seem right to me.


But it does suggest that the whole process is causing you to loose which
arguments are which.  In this case, your $0 is becoming /cygdrive/c/Space.
So you might try quoting your path to the script instead.  I expect 
strace of the shell could help you see where things "go wrong" if you're 
looking for more insight.


--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

