delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/22/18:56:26

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <27994510.post@talk.nabble.com>
Date: Mon, 22 Mar 2010 16:56:12 -0700 (PDT)
From: csw <csw AT well DOT com>
To: cygwin AT cygwin DOT com
Subject: error invoking commands preceded by '\' from bash shell
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

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

- Raw text -


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