X-Spam-Check-By: sourceware.org Message-ID: <5c8adab70610112003m34b68694n3a80a05a1187bce4@mail.gmail.com> Date: Wed, 11 Oct 2006 23:03:26 -0400 From: "Sean Daley" To: cygwin AT cygwin DOT com Subject: Re: Bash fails to run .bat file with spaces in pathname and argument In-Reply-To: <452DABED.5030409@cs.berkeley.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <452D5DF0 DOT 9070605 AT cs DOT berkeley DOT edu> <452D8FE7 DOT 9090705 AT byu DOT net> <452DABED DOT 5030409 AT cs DOT berkeley DOT edu> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 is a .bat file. If you run > what I have with only one item containing a space, or use a .sh script, > things work. Further, if you look at one of my examples, there is no > space in the program being executed; the space is only present in the > current working directory, and so clearly the proper quoting of the > program is not at issue here. > > I have finally found someone else who has come across the same issue: > http://sourceware.org/ml/cygwin/2004-09/msg00081.html > Apparently this is a bug in cygwin: > http://sourceware.org/ml/cygwin/2004-09/msg00145.html > Is anybody working on this? > > Johnathon 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 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 issue by writing a native executable that did the same things the batch job was supposed to do. Chris' suggestion of shell scripts also works as well. Sean -- 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/