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

2004-09-07 Thread Brian Dessent
Christopher Cobb wrote: > Conclusion: cmd.exe command line processing is brain dead. > > Among the problems are that cmd.exe looks for /exactly/ one pair of quotes and > no more (see my previous message). And that (double) quotes are the /only/ way > of quoting spaces. Wow. Hideous. I wonder

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

2004-09-07 Thread Christopher Cobb
Christopher Cobb email.com> writes: > > Brian Dessent dessent.net> writes: > > > > Interesting function. However, I found that it chokes if the name of > > the command to run has spaces, even if they are properly quoted on the > > command line, e.g. > > > > That's interesting. I'm running W

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

2004-09-07 Thread Christopher Cobb
Brian Dessent dessent.net> writes: > > Interesting function. However, I found that it chokes if the name of > the command to run has spaces, even if they are properly quoted on the > command line, e.g. > That's interesting. I'm running Win XP and even with your patches I /still/ get an error w

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

2004-09-04 Thread Brian Dessent
Christopher Cobb wrote: > I use the following shell function cmd() to invoke batch files. It removes > cygwinisms from the PATH and the environment first and does some argument > pre-processing. It also seems to fix the space problem. Interesting function. However, I found that it chokes if th

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

2004-09-03 Thread Mark Bohlman
Igor Pechtchanski wrote: On Fri, 3 Sep 2004, Mark Bohlman wrote: Igor Pechtchanski wrote: On Fri, 3 Sep 2004, Mark Bohlman wrote: Igor Pechtchanski wrote: On Fri, 3 Sep 2004, Christopher Cobb wrote: I get different results than you do. It seems to work as expected: [EMAIL PROTECTED] /c/Documen

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

2004-09-03 Thread Igor Pechtchanski
On Fri, 3 Sep 2004, Mark Bohlman wrote: > Igor Pechtchanski wrote: > > On Fri, 3 Sep 2004, Mark Bohlman wrote: > > > > > Igor Pechtchanski wrote: > > > > > > > On Fri, 3 Sep 2004, Christopher Cobb wrote: > > > > > > > > > I get different results than you do. It seems to work as expected: > > > >

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

2004-09-03 Thread Mark Bohlman
Igor Pechtchanski wrote: On Fri, 3 Sep 2004, Mark Bohlman wrote: Igor Pechtchanski wrote: On Fri, 3 Sep 2004, Christopher Cobb wrote: I get different results than you do. It seems to work as expected: [EMAIL PROTECTED] /c/Documents and Settings 09:45:46 511$ cat test.bat echo %1 [EMAIL PROTECTED

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

2004-09-03 Thread Igor Pechtchanski
On Fri, 3 Sep 2004, Mark Bohlman wrote: > Igor Pechtchanski wrote: > > On Fri, 3 Sep 2004, Christopher Cobb wrote: > > > > > I get different results than you do. It seems to work as expected: > > > > > > [EMAIL PROTECTED] /c/Documents and Settings 09:45:46 > > > 511$ cat test.bat > > > echo %1 >

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

2004-09-03 Thread Christopher Cobb
Igor Pechtchanski cs.nyu.edu> writes: > I believe you're missing the point. Try > > ./test.bat "hello world" > > and you'll get the error. I use the following shell function cmd() to invoke batch files. It removes cygwinisms from the PATH and the environment first and does some argument pre-p

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

2004-09-03 Thread Mark Bohlman
Igor Pechtchanski wrote: On Fri, 3 Sep 2004, Christopher Cobb wrote: I get different results than you do. It seems to work as expected: [EMAIL PROTECTED] /c/Documents and Settings 09:45:46 511$ cat test.bat echo %1 [EMAIL PROTECTED] /c/Documents and Settings 09:45:48 511$ ./test.bat C:\Documents

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

2004-09-03 Thread Igor Pechtchanski
On Fri, 3 Sep 2004, Christopher Cobb wrote: > I get different results than you do. It seems to work as expected: > > [EMAIL PROTECTED] /c/Documents and Settings 09:45:46 > 511$ cat test.bat > echo %1 > > [EMAIL PROTECTED] /c/Documents and Settings 09:45:48 > 511$ ./test.bat > > C:\Documents and S

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

2004-09-03 Thread Christopher Cobb
I get different results than you do. It seems to work as expected: [EMAIL PROTECTED] /c/Documents and Settings 09:45:46 511$ cat test.bat echo %1 [EMAIL PROTECTED] /c/Documents and Settings 09:45:48 511$ ./test.bat C:\Documents and Settings>echo ECHO is on. -- Unsubscribe info: http:

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

2004-09-02 Thread Larry Hall
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-ru

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

2004-09-02 Thread CyberZombie
I typed too soon... /c/Documents and Settings>./test.bat "Hello world" 'c:\Documents' is not recognized as an internal or external command, operable program or batch file. CyberZombie wrote: I don't get that behavior... ~>cd /c/Documents\ and\ Settings /c/Documents and Settings>cat test.bat @echo %

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

2004-09-02 Thread CyberZombie
I don't get that behavior... ~>cd /c/Documents\ and\ Settings /c/Documents and Settings>cat test.bat @echo %1 /c/Documents and Settings>./test.bat Hello world Hello /c/Documents and Settings>ls -l test.bat -rwxr-xr-x1 Rob None8 Sep 2 13:53 test.bat /c/Documents and Settings> S

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

2004-09-02 Thread Sean Daley
The problem is, there's nothing for me to quote here. It's not like the batch script fails to give me the correct information (due to incorrect quoting). The script fails to even LAUNCH when it lives in a directory with spaces and you pass in an argument with a space in it. Mind you, I've change

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

2004-09-02 Thread Sean Daley
Thank you for your most eloquent and considerably rude response. Though maybe that's my fault for not mentioning in my initial email that writing a shell script (which is something that I can do) is not an option. Unfortunately there are reasons why we need these .bat scripts (yes I don't like tha