delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/05/03:51:26

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Tue, 5 Oct 2004 17:51:17 +1000 (EST)
From: luke DOT kendall AT cisra DOT canon DOT com DOT au
Subject: Re: Shell script ignores $PATH?!
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Message-Id: <20041005075118.2D61385135@pessard.research.canon.com.au>

On  5 Oct, To: cygwin AT cygwin DOT com wrote:
>  Unfortunately, despite setting PATH to use only a network-installed 
>  Cygwin (and not include /bin, /usr/bin etc.), the shell script still 
>  somehow decides to invoke /usr/bin/sh. 

I have two more pieces of info: the shell is started by using
/usr/bin/sh if the script is simply invoked directly from bash by
typing its full pathname.

If I start it either via bash or sh, it runs using whatever bash or sh
is found from PATH.

So my guess is that when a script with no #!/path line is run, then the
default is to run /usr/bin/sh to start it, and the PATH simply doesn't
come into it.

luke


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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