delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4BF40756.1000709@bopp.net> |
Date: | Wed, 19 May 2010 10:44:22 -0500 |
From: | Jeremy Bopp <jeremy AT bopp DOT net> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: bash - command - PATH question |
References: | <3185EFAF9C8F7B4E9DBDF56829BF7C78378E8F0B AT srv060ex01 DOT ssd DOT fsi DOT com> <4BF3FC7A DOT 8030705 AT bopp DOT net> <3185EFAF9C8F7B4E9DBDF56829BF7C78378E8F33 AT srv060ex01 DOT ssd DOT fsi DOT com> |
In-Reply-To: | <3185EFAF9C8F7B4E9DBDF56829BF7C78378E8F33@srv060ex01.ssd.fsi.com> |
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 |
On 5/19/2010 10:16 AM, Rockefeller, Harry wrote: >> On 5/19/2010 8:50 AM, Rockefeller, Harry wrote: >>> Given that 'foo' is a bash script, why is it that: >>> >>> $ foo >>> >>> returns the error: >>> >>> bash: ./bin/foo: No such file or directory > >> What happens when you directly run ./bin/foo? > > I get exactly the same error. The error is correct. > ./bin/foo doesn't exist. (I'm not in home directory when > I issue the command.) What is the output of: echo $PATH Where does bin/foo exist, and from where are you trying to run it in these tests? >> What is the shebang (first line) of foo? > > #!/bin/bash > I thought it might have something to do with this and tried commenting > It out but nothing changed. I'm not aware of any way to comment out a shebang line aside from making it not be a shebang line anymore. In any case that line looks good, assuming it has a Unix line ending rather than a Windows line ending. You told Andrew that running dos2unix on foo didn't fix anything, so I assume it has a Unix line ending. >>> BUT since foo is *really in* PATH, e.g., >>> >>> $ `which foo` >>> >>> runs correctly? > >> What is the output of "which foo" in this case? > /cygdrive/c/DOCUME~1/harryr/bin/foo Did you run "which foo" from inside your home directory or from the same directory in which you attempted to run "foo" and "./bin/foo"? -Jeremy -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |