| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Message-ID: | <3BBCDC67.FBBC233F@hack.kampbjorn.com> |
| Date: | Fri, 05 Oct 2001 00:02:15 +0200 |
| From: | Hack =?iso-8859-1?Q?Kampbj=F8rn?= <bsd-dk AT hack DOT kampbjorn DOT com> |
| Reply-To: | cygwin AT cygwin DOT com |
| X-Mailer: | Mozilla 4.78 [en] (Windows NT 5.0; U) |
| X-Accept-Language: | en,da,es,ca |
| MIME-Version: | 1.0 |
| To: | litterio AT pyxsys DOT net |
| CC: | cygwin AT cygwin DOT com |
| Subject: | Re: Bug: Bash fails to execute script w/ same name as W2K program |
| (despite proper PATH ordering) | |
| References: | <000701c14cfb$2ab17620$4500f98c AT EMMAROSE> |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id f94M5aB00709 |
Francis Litterio wrote:
>
> Using Bash 2.05.0(8) under Cygwin 1.3.1-1, a shell script named the same
> as a program in c:\winnt\system32 is not executed, even if it is in a
> directory that appears ahead of /cygdrive/c/WINNT/system32 in the value
> of PATH. To reproduce:
I cannot reproduce it. Well, I'm actual setting it to executable ('chmod
+x') without that yes, but then that's expected behavior, if it's not
executable don't run it !
[hack AT DUR0N2000 hack]$ ipconfig
Windows 2000 IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.129
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
[hack AT DUR0N2000 hack]$ cat > /tmp/ipconfig
#! /bin/sh
echo My own ipconfig from /tmp !
[hack AT DUR0N2000 hack]$ chmod +x /tmp/ipconfig
[hack AT DUR0N2000 hack]$ PATH=/tmp:$PATH
[hack AT DUR0N2000 hack]$ ipconfig
My own ipconfig from /tmp !
[hack AT DUR0N2000 hack]$ chmod -x /tmp/ipconfig
[hack AT DUR0N2000 hack]$ hash -r
[hack AT DUR0N2000 hack]$ ipconfig
Windows 2000 IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.129
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
[hack AT DUR0N2000 hack]$
>
> bash$ hash -r
> bash$ type -a ipconfig
> ipconfig is /cygdrive/c/WINNT/system32/ipconfig
> bash$ ipconfig
>
> Windows 2000 IP Configuration
>
> Ethernet adapter Local Area Connection:
>
> Connection-specific DNS Suffix . : pyxsys.net
> IP Address. . . . . . . . . . . . : 140.249.0.69
> Subnet Mask . . . . . . . . . . . : 255.255.0.0
> Default Gateway . . . . . . . . . : 140.249.0.249
> bash$ cat > /tmp/ipconfig
> #!/bin/sh
> echo foobar
> ^D
> bash$ PATH="/tmp:$PATH"
> bash$ hash -r
> bash$ ipconfig
>
> Windows 2000 IP Configuration
>
> Ethernet adapter Local Area Connection:
>
> Connection-specific DNS Suffix . : pyxsys.net
> IP Address. . . . . . . . . . . . : 140.249.0.69
> Subnet Mask . . . . . . . . . . . : 255.255.0.0
> Default Gateway . . . . . . . . . : 140.249.0.249
> bash$ /tmp/ipconfig
> foobar
>
> --
> Francis Litterio
> Software Engineer
> Pyxsys Corproration
> litterio AT pyxsys DOT net
> 978-371-9115 x131
>
--
Med venlig hilsen / Kind regards
Hack Kampbjørn hack AT hackdata DOT com
HackLine +45 2031 7799
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |