1 |
On Thu, 20 Sep 2007 08:09:08 -0400 "John R. Graham" <n3440d@×××××.com> |
2 |
wrote: |
3 |
> Mike, I agree. But, the file that _must_ exist isn't "~/.bashrc" but |
4 |
> "~/.bash_profile". |
5 |
|
6 |
That's wrong. Quote: |
7 |
|
8 |
"When bash is invoked as an interactive login shell, or as a non-inter- |
9 |
active shell with the --login option, it first reads and executes com- |
10 |
mands from the file /etc/profile, if that file exists. After reading |
11 |
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, |
12 |
in that order, and reads and executes commands from the first one that |
13 |
exists and is readable. The --noprofile option may be used when the |
14 |
shell is started to inhibit this behavior." |
15 |
|
16 |
Notice "the first one that exists and is readable". |
17 |
|
18 |
> If "~/.bash_profile" doesn't exist, then "~/.bashrc" won't be sourced |
19 |
> whether it exists or not. |
20 |
|
21 |
Wrong again. Two paragraphs down in the man page: |
22 |
|
23 |
"When an interactive shell that is not a login shell is started, bash |
24 |
reads and executes commands from ~/.bashrc, if that file exists." |
25 |
|
26 |
In this case ~/.bashrc is sourced directly. |
27 |
|
28 |
|
29 |
Cheers, |
30 |
Renat |
31 |
|
32 |
-- |
33 |
Probleme kann man niemals mit derselben Denkweise loesen, |
34 |
durch die sie entstanden sind. |
35 |
(Einstein) |