delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/02/15:02:50

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Reply-To: Cygwin List <cygwin AT cygwin DOT 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 AT gmail DOT com>, cygwin AT cygwin DOT com
From: Larry Hall <lh-no-personal-replies-please AT cygwin DOT 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 AT mail DOT gmail DOT com> <4137566C DOT 7070203 AT sbcglobal DOT net> <5c8adab704090210405ea696e4 AT mail DOT gmail DOT com> <413760BD DOT 2080504 AT sbcglobal DOT net> <5c8adab70409021123291886c7 AT mail DOT gmail DOT com>
Mime-Version: 1.0

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/

- Raw text -


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