Thread: Path=$path:
View Single Post
Old Jul 9th, 2006, 3:12 AM   #2
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Quote:
This is what I think is happening:
The PATH=/usr/local/bin sets the variable to what ever is on the right hand side of the =
Yes, you are correct.

Quote:
Export PATH exports the variable, as it is a global variable it is able to do this (can some one confirm this is correct)
Exporting the variable, makes the value of the variable accessible by the system... as in a "system environment variable".

Quote:
$PATH: was on a line that followed PATH=/usr/local/bin so I assume this somhow appends the string within the variable (this is a guess and the part I am most confused by). What is the “:” all about?.
$PATH is used as a place holder for the value of the current path. The new path (/usr/local/bin) is appended to the current path ($PATH). The : is a delimeter to separate the various directories specified in the path.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote