[CLUE-Tech] shell programming
David Guntner
davidg at akaMail.com
Wed Dec 11 13:18:35 MST 2002
Dave Price grabbed a keyboard and wrote:
>
> On Wed, Dec 11, 2002 at 03:19:34AM -0800, David Guntner wrote:
> >
> > 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 tend to type bash commands as if they were in scripts ... like using
> fully qualified domain names and absolute paths - I just do not want to
> dip into the black art of what is a spawned process and which
> .shellwhatchajiggies get read whaen I invoke one (login shell .vs. non).
>
> Plus, I learned to do this before I figured out the 'why' of it ...
>
> (I also explictely state the shell that I want my scripts to invoke)
>
> I know if I am explicite I am POSIX compliant, and all is easier to debug
I did not mean to imply that what you were suggesting wouldn't work, nor
that it was a "bad idea." It will work, and it isn't bad, of course. I
was merely trying to be informative in that "export" isn't strictly needed
unless a child process needs to pick up the value of the variable being
set. I was simply explaining what "export" actually does, since it wasn't
clear from my reading of your message that that was understood. Using it
where it isn't required doesn't hurt anything, of course.
--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