[CLUE-Tech] shell programming
Dave Price
davep at kinaole.org
Wed Dec 11 04:34:56 MST 2002
On Wed, Dec 11, 2002 at 03:19:34AM -0800, David Guntner wrote:
> Dave Price grabbed a keyboard and wrote:
> >
> > Try setting the lower-case $user and $uid with the bash built-in
> > 'export' - see my sample.
My sample was meant to be totally portable, and guaranteed to work.
>
> 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
aloha,
dave
More information about the clue-tech
mailing list