bug-bash
[Top][All Lists]
Advanced

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

bash $ENV handling ?


From: David Balazic
Subject: bash $ENV handling ?
Date: Wed, 19 Sep 2001 11:16:42 +0200

My experience with bash startup file handling.
The problem is that I could not get it to use $ENV.


Information from the bash man page :

Login shells:
  On login (subject to the -noprofile option):
        if /etc/profile exists, source it.

        if ~/.bash_profile exists, source it,
          else if ~/.bash_login exists, source it,
            else if ~/.profile exists, source it.

  On exit:
        if ~/.bash_logout exists, source it.

Non-login interactive shells:
  On startup (subject to the -norc and -rcfile options):
        if ~/.bashrc exists, source it.

Non-interactive shells:
  On startup:
        if the environment variable ENV is non-null, expand
        it and source the file it names, as if the command
                if [ "$ENV" ]; then . $ENV; fi
        had been executed, but do not use PATH to search
        for the pathname.  When not started in Posix mode, bash
        looks for BASH_ENV before ENV.
# see note [2] !!!



Notes :

[2] Experiance with 
GNU bash, version 2.04.0(1)-release (rs6000-ibm.aix4.3.2.0-none)
show that this is not true !

bash ignores the ENV parameter when running scripts completely, regardless if 
running normaly or in POSIX mode ( --posix option ). In POSIX mode it ignores 
both ENV and
BASH_ENV. In non-posix mode it ignores ENV, but uses BASH_ENV properly.

-- 
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



reply via email to

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