delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/23/09:13:14

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <27994510.post@talk.nabble.com>
References: <27994510 DOT post AT talk DOT nabble DOT com>
Date: Tue, 23 Mar 2010 09:12:57 -0500
Message-ID: <98ee36eb1003230712v3d824b98s6826c57ae2b78dcb@mail.gmail.com>
Subject: Re: error invoking commands preceded by '\' from bash shell
From: rifter rifter <rifter0x0000 AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

you can refer to it by its propoer path; in this case /bin/gcc ..
if it is something that is not in the normal cygwin tree, there is a
convention for that, too, e.g. instead of c:\myprograms\prog.exe you'd
use /cygdrive/c/myprograms/prog.exe
the cygdrive part is configurable; you can change it to nothing or to
something else.

On 3/22/10, csw <csw AT well DOT com> 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 '\'?
>
> Thanks,
>
> -csw
>
> Runnning on Vista 64-bit
>
> $ cygcheck -v gcc
> Found: C:\cygwin\bin\gcc.exe
> Found: C:\cygwin\bin\gcc.exe
>  -> C:\cygwin\etc\alternatives\gcc
>  -> C:\cygwin\bin\gcc-3.exe
> C:\cygwin\bin\gcc-3.exe - os=4.0 img=1.0 sys=4.0
>   C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
>     "cygwin1.dll" v0.0 ts=2009/12/7 2:48
>     C:\Windows\system32\ADVAPI32.DLL - os=6.0 img=6.0 sys=6.0
>       "ADVAPI32.dll" v0.0 ts=2009/4/10 22:08
>       C:\Windows\system32\ntdll.dll - os=6.0 img=6.0 sys=6.0
>         "ntdll.dll" v0.0 ts=2009/4/10 21:13
>       C:\Windows\system32\KERNEL32.dll - os=6.0 img=6.0 sys=6.0
>         "KERNEL32.dll" v0.0 ts=2009/4/10 21:16
>         C:\Windows\system32\ntdll.dll (already done)
>       C:\Windows\system32\RPCRT4.dll - os=6.0 img=6.0 sys=6.0
>         "RPCRT4.dll" v0.0 ts=2009/4/23 3:16
>         C:\Windows\system32\KERNEL32.dll (already done)
>         C:\Windows\system32\ntdll.dll (already done)
>         C:\Windows\system32\ADVAPI32.dll (recursive)
>         C:\Windows\system32\Secur32.dll - os=6.0 img=6.0 sys=6.0
>           "Secur32.dll" v0.0 ts=2009/6/15 5:48
>           C:\Windows\system32\ntdll.dll (already done)
>           C:\Windows\system32\KERNEL32.dll (already done)
>           C:\Windows\system32\ADVAPI32.dll (recursive)
>     C:\Windows\system32\KERNEL32.dll (already done)
>     C:\Windows\system32\ntdll.dll (already done)
>   C:\cygwin\bin\cygintl-8.dll - os=4.0 img=1.0 sys=4.0
>     "cygintl-8.dll" v0.0 ts=2009/4/2 18:15
>     C:\cygwin\bin\cygwin1.dll (already done)
>     C:\cygwin\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0
>       "cygiconv-2.dll" v0.0 ts=2009/12/23 5:25
>       C:\cygwin\bin\cygwin1.dll (already done)
>       C:\cygwin\bin\cyggcc_s-1.dll - os=4.0 img=1.0 sys=4.0
>         "cyggcc_s-1.dll" v0.0 ts=2009/12/7 16:30
>         C:\cygwin\bin\cygwin1.dll (already done)
>         C:\Windows\system32\KERNEL32.dll (already done)
>       C:\Windows\system32\KERNEL32.dll (already done)
>     C:\Windows\system32\KERNEL32.dll (already done)
>   C:\Windows\system32\KERNEL32.dll (already done)
>
> --
> View this message in context:
> http://old.nabble.com/error-invoking-commands-preceded-by-%27%5C%27-from-bash-shell-tp27994510p27994510.html
> Sent from the Cygwin list mailing list archive at Nabble.com.
>
>
> --
> 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
>
>

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019