bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BASH_ENV does not behave as expected.


From: Eric Darrot
Subject: Re: BASH_ENV does not behave as expected.
Date: Mon, 28 Jan 2002 20:21:31 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2

Chet Ramey wrote:

Machine Type: i686-keynux-linux-gnu

Bash Version: 2.05a
Patch Level: 0
Release Status: release

Description:
        Well, easy description, the following doesn't work:

        echo "echo hello-world" > /tmp/bashenv.sh
        chmod 755 /tmp/bashenv
        BASH_ENV=/tmp/bashenv.sh bash

        But it should, as stated in the man page:

        --- begin of citation
        Bash behaves as  if  the  following  command
        were executed:
              if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
        --- end of citation


You should have read the rest of the section from which you clipped
the cited text.  It reads, in part

        When bash is started non-interactively, to run a shell
        script, for example, it looks for the variable BASH_ENV ...

The above example starts an interactive shell.


Yes, I read it, but the mistake was not there...
I just rewrote my test script but with

echo "touch /tmp/hello-world" > /tmp/bashenv.sh

instead and it worked. Testing with echo was a stupid
bad idea, sorry... Thank you all for your cooperation.
-- Eric
_____________________________________________________
KEYNUX - c/o INRIA (MASCOTTE) 2004 Route des Lucioles
   B.P. 93 - 06902 SOPHIA ANTIPOLIS CEDEX - FRANCE
    tel +33 4 92 38 78 29 / fax +33 4 92 38 79 71




reply via email to

[Prev in Thread] Current Thread [Next in Thread]