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/



Reply via email to