X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 	tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
X-TPG-Abuse: host=123-243-74-63.tpgi.com.au; ip=123.243.74.63; date=Wed, 10 Mar 2010 21:47:44 +1100; auth=+xHq3JwZYadZIHPPIIXj7mLD3QUfH+89GYY2HvrLPHs=
Message-ID: <4B97789F.1060405@shaddybaddah.name>
Date: Wed, 10 Mar 2010 10:46:55 +0000
From: Shaddy Baddah <helium@shaddybaddah.name>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: allow executing a path in backslash notation
References: <720660.16774.qm@web88302.mail.re4.yahoo.com> 	 <20100310092536.GS6505@calimero.vinschen.de> <e6940be71003100203h297db699ua44ae9086bf64a72@mail.gmail.com>
In-Reply-To: <e6940be71003100203h297db699ua44ae9086bf64a72@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Hi,

On 10/03/2010 10:03 AM, Ilya Beylin wrote:
> The problem is that DOS paths are treated differently, even within the
> same program.
> Take for instance, bash:
>
> $ builtin test -x "$WINDIR\system32\cmd.exe"&&  echo ok
> yes
> $ builtin exec "$WINDIR\system32\cmd.exe" /C echo ok
> -bash: exec: C:\WINDOWS\system32\cmd.exe: not found
>
> That makes a lot of headache both for users and for programmers who
> have to remember about all such special cases

Is it me, or is the quoting all wrong? Doesn't backslash in the double
quote (") acts as an escape character. i.e \s = s, \c = c etc.

So, how is the exec (and apparently test) getting the correct string?

Regards,
Shaddy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

