[CLUE-Tech] shell programming
David Guntner
davidg at akaMail.com
Wed Dec 11 04:19:34 MST 2002
Dave Price grabbed a keyboard and wrote:
>
> Try setting the lower-case $user and $uid with the bash built-in
> 'export' - see my sample.
Just FYI: "export" is only needed if you want the variable in question to
be available to processes that are the children of the process that's
running that sets the variable. Other than that, it does nothing.
I.E., if you're writing a script which is going to set a variable, and that
script is going to call (run) another script which needs to use the value
stored in the variable set in the first script, then you need to export the
variable in the first script. If the variable is only going to be used in
the first script (or just within your local shell session if you're running
programs manually, etc.), then there's no need to export it.
--Dave
--
David Guntner GEnie: Just say NO!
http://www.akaMail.com/pgpkey/davidg or key server
for PGP Public key
More information about the clue-tech
mailing list