![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Feb 2006
Location: 127.0.0.1
Posts: 35
Rep Power: 0
![]() |
Path=$path:
I redirected env into a file, and then altered it a little so that I could set the environmental variables when a script is executed.
I was having a problem when the script was being executed by cron. In the end it worked out ok but I was wondering if anyone could explain each part of the command I added or has a link to a page that had some info on it. I found the command in a scripting book and then again on the web but neither of them went into any detail. I hate using code that I don’t understand. PATH=$PATH:/usr/local/bin export PATH 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 = Export PATH exports the variable, as it is a global variable it is able to do this (can some one confirm this is correct) $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?. hush |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|