The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: Modify Path
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 11-18-2008
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,970
Quote:
Originally Posted by msb65 View Post
Hi Yogesh,

I appreciate your help. Perhaps you can clear up one other path related issue.

- Why modify the .bash_profile instead of the .bashrc?
On your system there seems to be no difference between the two; one always sources the other if it exists. On my system, .bashrc is always sourced when I login, but .bash_profile is skipped for noninteractive shells.
Quote:
Like I said I am using BASH on a Mac running Leopard. For the most part I use Terminal for my command line related work. However, sometimes I use X11 as well. I noticed that when i typed "echo $PATH" in a Terminal shell it returned a different series of directories than when I did the same in an X11 shell. I believe this is because those two programs check different environment files. Is that correct?
Maybe. I've noticed that Apple sometimes customizes these things in odd ways.
Quote:
A user in a different forum suggested that I modify my .bash_profile and .bashrc files. Can you tell what exactly is going on? Here are the contents:
Please use code tags for code. like [ code ] asdf [ /code ] except without the extra spaces.


Code:
# Checks if the ~/.aliases file exists;  if it does, sources it.
if [ -f ~/.aliases ]; then
. ~/.aliases
fi

# Something to do with file size limits.  Mine doesn't have -Ss, so see
# 'man ulimit' on your system..
ulimit -Ss unlimited

# Includes some mac-specific environment variables, perhaps
source /Users/msb65/seadas5.2/config/seadas.env


Code:
# If .bash_profile exists, source it.
if [ -f ~/.bash_profile ]; then
. ~/.bash_profile
fi