delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/08/05/18:05:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-Id: <5.2.1.1.2.20030805150050.02cbee60@pop.sonic.net>
X-Sender: rschulz AT pop DOT sonic DOT net
Date: Tue, 05 Aug 2003 15:05:13 -0700
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rschulz AT sonic DOT net>
Subject: Re: Yes but I don't understand ...
In-Reply-To: <Pine.GSO.4.44.0308051626120.1949-100000@slinky.cs.nyu.edu>
References: <3F30103F DOT 3080700 AT pusspaws DOT net>
Mime-Version: 1.0

Igor,

At 13:29 2003-08-05, Igor Pechtchanski wrote:
>On Tue, 5 Aug 2003, David Selby wrote:
>
> > You are dead right, I tried
> >
> > /bin/bash <script>
> >
> > and it worked perfectly, but I am afraid I do not understand why ...
> > echo $BASH_VERSION
> > Tells me I have bash
>
>Yes, because it's inherited from the parent shell environment, most
>likely (or you're running the above command from bash).  You do have bash
>installed, but as /bin/bash, *not* /bin/sh.

BASH_VERSION, as well as its counterpart BASH_VERINFO, are not exported 
by default.

I think the explanation for what David is seeing is that his 
interactive shell is BASH, as is the default for interactive sessions 
under Cygwin. But his script used the shebang line #!/bin/sh, which as 
we all know is ash. It seems that he (David) was under the combined 
misapprehensions that the interactive shell was /bin/sh and that 
/bin/sh was BASH.


>...
>
>     Igor


Randall Schulz 


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