On Thu, 20 Sep 2007 08:09:08 -0400 "John R. Graham" <[EMAIL PROTECTED]>
wrote:
> Mike, I agree.  But, the file that _must_ exist isn't "~/.bashrc" but
> "~/.bash_profile". 

That's wrong. Quote:

"When  bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads and executes  com-
mands  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."

Notice "the first one that exists and is readable".

> If "~/.bash_profile" doesn't exist, then "~/.bashrc" won't be sourced
> whether it exists or not.

Wrong again. Two paragraphs down in the man page:

"When an interactive shell that is not a login shell  is  started, bash
reads  and executes commands from ~/.bashrc, if that file exists."

In this case ~/.bashrc is sourced directly.


Cheers,
Renat

-- 
Probleme kann man niemals mit derselben Denkweise loesen,
durch die sie entstanden sind.
                                              (Einstein)

Attachment: signature.asc
Description: PGP signature

Reply via email to