I’ve been spending a great deal of time with BASH lately and I’m confused about best practices on the mac. I found this helpful article.
Why two different files?
Say, you’d like to print some lengthy diagnostic information about your machine each time you login (load average, memory usage, current users, etc). You only want to see it on login, so you only want to place this in your .bash_profile. If you put it in your .bashrc, you’d see it every time you open a new terminal window.
Another thing to keep in mind is that MAC OSX keeps it’s .bashrc file (located at ~/.bashrc on linux/unix) in a file located at /etc/bashrc