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: Chet Ramey
Subject: Re: BASH_ENV does not behave as expected.
Date: Mon, 28 Jan 2002 11:54:10 -0500

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

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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