Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-25 Thread Greg Martyn
Hi Johnathon, This workaround worked for me: $ cmd /c test.bat "hello world" Cheers, Greg Martyn pgpfOZyZeA019.pgp Description: PGP signature

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-17 Thread Larry Hall (Cygwin)
. Reformatted. Johnathon Jamison wrote: Sean Daley wrote: I'm not sure if it was ever fully decided that this was a cygwin bug since windows cmd can also exhibit similar behavior. I was the original poster back then. I eventually just worked around the is

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-17 Thread Johnathon Jamison
I think that you are right in saying this is not a cygwin bug. Upon further investigation, it seems it is a cmd misfeature. Would a patch to oddly quote things that spawn_guts "knew" would be passed off to cmd be accepted, given that it would not be a fix, but a kludgy workaround? Or would i

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-13 Thread Enrico Forestieri
Sean Daley writes: > Read further down that thread and you'll also see that people discovered some > additional horrifying things about windows cmd. > > http://sourceware.org/ml/cygwin/2004-09/msg00277.html Referring to that old post, the following works: C:\>cmd /c ""C:\Documents and Settings\

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-13 Thread Johnathon Jamison
Buchbinder, Barry (NIH/NIAID) [E] wrote: The problem is, at least in part, with cmd. cmd /? says: If /C or /K is specified, then the remainder of the command line after the switch is processed as a command line, where the following logic is used to process quote (") characters: 1.

RE: Bash fails to run .bat file with spaces in pathname and argument

2006-10-13 Thread Buchbinder, Barry \(NIH/NIAID\) [E]
Buchbinder, Barry (NIH/NIAID) wrote: > * Johnathon Jamison (Wed, 11 Oct 2006 14:11:12 -0700) >> I am having some funny behavior. If I have a .bat file that is in a >> directory whose pathname contains a space, and an argument is given >> to the .bat file that has a space in it, then the .bat file

RE: Bash fails to run .bat file with spaces in pathname and argument

2006-10-13 Thread Buchbinder, Barry \(NIH/NIAID\) [E]
* Johnathon Jamison (Wed, 11 Oct 2006 14:11:12 -0700) > I am having some funny behavior. If I have a .bat file that is in a > directory whose pathname contains a space, and an argument is given > to the .bat file that has a space in it, then the .bat file fails to run. > Instead, I get "'xxx' is

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-12 Thread Larry Hall (Cygwin)
On 10/12/2006, Johnathon Jamison wrote: Lastly, why is CreateProcess used to exec a process instead of _spawnve? It would appear to me on the face of things that _spawnve would get around the quoting issues entirely. -- Larry Hall

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-12 Thread Johnathon Jamison
That is strange quoting syntax, with carets, but it works. I wonder why the last caret is needed, which does seem to be required. Thank you for giving this to me, since I had not seen this example. None of the solutions using cmd are great, because it can be hard to explain such things to cu

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-12 Thread Johnathon Jamison
Christopher Faylor wrote: On Wed, Oct 11, 2006 at 07:43:57PM -0700, Johnathon Jamison wrote: Respectfully, I think I know how shell quoting works. If you look at the sample run, all spaces are properly escaped with either backslashes or double quotes. The problem only surfaces when BOTH the

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-12 Thread Thorsten Kampe
* Johnathon Jamison (Wed, 11 Oct 2006 14:11:12 -0700) > I am having some funny behavior. If I have a .bat file that is in a > directory whose pathname contains a space, and an argument is given to > the .bat file that has a space in it, then the .bat file fails to run. > Instead, I get "'xxx' i

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-11 Thread Sean Daley
On 10/11/06, Johnathon Jamison <> wrote: Respectfully, I think I know how shell quoting works. If you look at the sample run, all spaces are properly escaped with either backslashes or double quotes. The problem only surfaces when BOTH the program AND the argument have spaces, AND the program i

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-11 Thread Christopher Faylor
On Wed, Oct 11, 2006 at 07:43:57PM -0700, Johnathon Jamison wrote: >Respectfully, I think I know how shell quoting works. If you look at >the sample run, all spaces are properly escaped with either backslashes >or double quotes. The problem only surfaces when BOTH the program AND >the argument

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-11 Thread Johnathon Jamison
Respectfully, I think I know how shell quoting works. If you look at the sample run, all spaces are properly escaped with either backslashes or double quotes. The problem only surfaces when BOTH the program AND the argument have spaces, AND the program is a .bat file. If you run what I have

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-11 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Johnathon Jamison on 10/11/2006 3:11 PM: > Hello, > > I am having some funny behavior. If I have a .bat file that is in a > directory whose pathname contains a space, and an argument is given to > the .bat file that has a space in it, th

Re: Bash fails to run .bat file with spaces in pathname and argument

2006-10-11 Thread Johnathon Jamison
Sorry, did not read posting guidelines well enough. Attaching output of cygcheck -s -v -r. Johnathon Johnathon Jamison wrote: Hello, I am having some funny behavior. If I have a .bat file that is in a directory whose pathname contains a space, and an argument is given to the .bat file tha

Bash fails to run .bat file with spaces in pathname and argument

2006-10-11 Thread Johnathon Jamison
Hello, I am having some funny behavior. If I have a .bat file that is in a directory whose pathname contains a space, and an argument is given to the .bat file that has a space in it, then the .bat file fails to run. Instead, I get "'xxx' is not recognized as an internal or external command,