On Tuesday 02 January 2007 15:00, Greg Wallace wrote:
> ...
>
> Doesn't ~/.bashrc run every time you open a shell?

The commands contained in ~/.bashrc are executed for every shell invoked 
unless the "--norc" option is specified. That's true not only for 
interactive shells but also for shells launched to execute scripts, 
which is why all my scripts use this shebang line:

!#/bin/bash --norc


If you don't do this, you really don't know what aliases, variables and 
shell procedures are defined when your script runs, since the .bashrc 
read is that of the invoking user.


> ...
>
> Greg Wallace


Randall Schulz
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to