<<< Date Index >>>     <<< Thread Index >>>

Re: Leopard Migration Hammered Mutt



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday, January 28 at 02:49 AM, quoth c4c4@xxxxxxxxxxx:
> Your suggestion below pointed out that  .bash_profile is the 
> initialization file.  But  .bash_profile has no references to Path 
> in it.  I can add  PATH=$PATH:/sw/bin  as you suggested, but will 
> adding this override my original Path variable, or simply add it to 
> the existing path?

It adds it to the existing path.

Your Path is stored as a colon-separated list of folders containing 
programs (e.g. "/bin:/usr/bin:/sbin:/usr/sbin"). The string "$PATH" is 
a reference to the existing path---if you say "echo $PATH" your shell 
will print out your current PATH, because that's the string referred 
to be the notation "$PATH". When you tell your shell to set a variable 
name to be something, it performs a similar kind of expansion. For 
example, if you say FOO=$PATH, the variable FOO will now contain a 
copy of the contents of the variable $PATH. You can append things to 
variable expansions, because the shell operates almost entirely in 
terms of lines of text. For example, if you say "FOO=word", then the 
command "echo $FOO" will print out "word". If you then say 
BAR=$FOO-plunkity, the BAR variable will consist of "word-plunkity". A  
similar think would happen had you instead said FOO=$FOO-plunkity, 
which is that FOO would then be a reference to the text 
"word-plunkity". Do you see how that works?

Thus, the command suggested, "PATH=$PATH:/sw/bin", will set the PATH 
to be a string consisting of whatever $PATH is (i.e. your current 
path), a colon, and the string /sw/bin. It will not throw away your 
existing path.

> If it is possible I would rather add  /sw/bin  to the resource file 
> where the rest of my Path is stored.  How would I go about doing 
> this?

That would be /etc/profile

~Kyle
- -- 
It was luxuries like air conditioning that brought down the Roman 
Empire. With air conditioning their windows were shut, they couldn’t 
hear the barbarians coming.
                                                    -- Garrison Keillor
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFHnUZNBkIOoMqOI14RAvPfAJ9gBxtJxjfGemlOl+4EllY61WyyZQCfTcC9
/7s+ttnYhH7uk3ahlkjXb1s=
=PJjD
-----END PGP SIGNATURE-----