Joao Ferreira Gmail <[email protected]> wrote: > I read a text about bash that mentions a difference between "login > shell" and "interactive shell".
> I'm affraid I don not know the difference. Can anyone enlighten me ? I've always found bash to be singularly unhelpful with its approach to .bash_profile and .bashrc. Many years ago I used (t)csh and its approach seemed to be logical and self-consistent: .cshrc is always run, *and* .login is run for the first interactive (login) shell. This allowed me to put "run once" configurations into .login and "every time" configurations in .cshrc. These days I've taken this approach with bash, and I put environment variables and other preparation into .bash_profile, and every-time configuration into .bashrc (functions, aliases, terminal setttings, etc.) with interactive items protected by an « if test -n "$PS1"... » construct. The final piece of the jigsaw is a check at the top of .bashrc to run .bash_profile - but only if it's not already been run - and a check at the bottom of .bash_profile to chain .bashrc - again, provided it's not already being run. Code samples available on request (to the list). Chris -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

