[Techtalk] Newbie & crontab
Terri Oda
terri at zone12.com
Tue Nov 16 19:41:50 EST 2004
On Nov 16, 2004, at 3:35 AM, Conor Daly wrote:
> While I'm not entirely clear on what 'export' does, it's not necessary
> here.
> Once I set PATH in my script, anything that script calls will get
> $PATH as
> set. 'export PATH' is used where you wish a variable to persist after
> the
> script has run. However, I can't seem to make that happen...
export is great when you want scripts called from a given script to
inherit the same variable settings.
I use it for stuff like this:
script1 sets and exports $data_dir=/home/terri/data
script1 calls script2
script2 can use the variable $data_dir, as set by script1
Terri
More information about the Techtalk
mailing list