This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: error invoking commands preceded by '\' from bash shell
- From: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 22 Mar 2010 22:54:40 -0400
- Subject: Re: error invoking commands preceded by '\' from bash shell
- References: <27994510.post@talk.nabble.com>
- Reply-to: cygwin at cygwin dot com
On 3/22/2010 7:56 PM, csw wrote:
When running bash under cygwin on Vista 64bit, I get different behavior if I
precede a command with a '\'.
For example, this works fine ($ is the bash prompt),
$ 'C:\cygwin\bin/gcc.exe' -help
Usage: gcc [options] file...
Options:...
However, this fails.
$ 'C:\cygwin\bin\gcc.exe' --help
bash: C:\cygwin\bin\gcc.exe: command not found
The particular command does not seem to matter. I used gcc here because it
was the command I discovered this problem with.
Does anyone know why it makes a difference if the last character before the
command is a '/' or a '\'?
It doesn't matter where you put the '\'.
POSIX paths are strongly preferred. And '/' is preferred to '\' as a path
separator. If you want to avoid difficulties, use this information as
guidelines. Otherwise, it may work or it may not.
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
_____________________________________________________________________
A: Yes.
Q: Are you sure?
A: Because it reverses the logical flow of conversation.
Q: Why is top posting annoying in email?
--
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