This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Problem executing a .bat script in a directory with spaces using bash

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


>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                    
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]