X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0	tests=AWL,BAYES_00,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
From: "Rockefeller, Harry" <Harry.Rockefeller@flightsafety.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Date: Wed, 19 May 2010 10:16:23 -0500
Subject: RE: bash - command - PATH question
Message-ID: <3185EFAF9C8F7B4E9DBDF56829BF7C78378E8F33@srv060ex01.ssd.fsi.com>
References: <3185EFAF9C8F7B4E9DBDF56829BF7C78378E8F0B@srv060ex01.ssd.fsi.com> <4BF3FC7A.8030705@bopp.net>
In-Reply-To: <4BF3FC7A.8030705@bopp.net>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

> On 5/19/2010 8:50 AM, Rockefeller, Harry wrote:
> > Given that 'foo' is a bash script, why is it that:
> >=20
> > $ foo=20
> >=20
> > returns the error:
> >=20
> > bash: ./bin/foo: No such file or directory

> What happens when you directly run ./bin/foo?=20

I get exactly the same error.  The error is correct.
./bin/foo doesn't exist. (I'm not in home directory when=20
I issue the command.)

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

> > BUT since foo is *really in* PATH, e.g.,
> >=20
> > $ `which foo`
> >=20
> > runs correctly?

> What is the output of "which foo" in this case?
/cygdrive/c/DOCUME~1/harryr/bin/foo


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

