> Neil Bothwick wrote: > > On Wed, 19 Sep 2007 17:03:16 +0200, David Harel wrote: > >> I was surprised to find that in man bash the reference to initialization > >> files is wrong. The bash manual says it reads initialization files from > >> /etc/profile: > >> FILES > >> /bin/bash > >> The bash executable > >> /etc/profile > >> The systemwide initialization file, executed for login > >> shells > >> > >> > >> Where real life uses /etc/bash/bashrc > >> This part is taken from strace dump: strace bash -i > >> open("/etc/bash/bashrc", O_RDONLY|O_LARGEFILE) = 3 Hmmm. bash -i is not a login shell. An interactive shell doesn't read /etc/profile if it's not a login shell. From man bash: ``When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior. When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc.'' -- ---------------------------------------- Mrugesh Karnik GPG Key 0xBA6F1DA8 Public key on http://wwwkeys.pgp.net ----------------------------------------