

Bash_profile vs. .bashrc - akandiah
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html

======
blippe
I would recommend reading[0] instead.

[0] [http://www.thegeekstuff.com/2008/10/execution-sequence-
for-b...](http://www.thegeekstuff.com/2008/10/execution-sequence-for-
bash_profile-bashrc-bash_login-profile-and-bash_logout/)

~~~
blippe
And quite honestly the man page of bash is quite readable, under _invocation_.
[http://linux.die.net/man/1/bash](http://linux.die.net/man/1/bash)

------
Canada
In my opinion the only thing .bash_profile should do is source .bashrc, that
way the environment is consistent regardless of invocation.

------
RexRollman
In the example he gives, like many I have seen on the Internet, it tests for
.bashrc and if it exists, sources it. But if you didn't test it and for some
reason .bashrc didn't exist, what would happen? And if nothing bad would
happen, why test for it?

~~~
akandiah
It's just for cleanliness. The script would error out with something along the
lines of "No such file or directory".

~~~
RexRollman
Thanks. I've never tried it out and was curious if anyone knew.

