Gerald Lai wrote:
On Wed, 24 May 2006, A.J.Mechelynck wrote:
Eric Arnold wrote:
Off hand, I can't remember the exact name, but I think that there is a
special rc filename that is executed even when it isn't a login
shell.....
[...]
Yes, I think so too, and I don't remember it offhand either, but "man
bash" (which is quite long for a manpage) will tell you.
Perhaps it's called ".bashenv"? Not sure. I use ZSH. It's equivalent
is ".zshenv".
--
Gerald
As said under INVOCATION in the bash manpage:
Login shell: /etc/profile (if found), then the first one (if any) found
readable among ~/.bash_profile, ~/.bash_login, ~/.profile (all this
unless --noprofile). At exit: ~/.bash_logout (if found).
Non-login interactive shell: ~/.bashrc (if found) unless --norc
Non-interactive shell: does as if executing
if [ -n "BASH_ENV" ]; then . "$BASH_ENV"; fi
but doesn't search the $PATH
There are more details about what bash does when invoked as sh, when
invoked in posix mode, when invoked by the remote shell daemon, or when
invoked in suid mode.
Under FILES, two additional files (for readline initialization) are
mentioned.
Best regards,
Tony.