> -----Original Message-----
> From: Beni Cherniavsky 
> Sent: Sunday, February 23, 2003 2:02 PM
> Subject: Re: Problem with Pth or make or what?
>
> Aside from security, it can also confuse scripts when you run 
> them in a
> directory containing a program named the same as some system 
> program the
> script uses.

Rule #1 for script writing - never EVER relay on $PATH, better reset the
path
to a known value if you can and if you have the patience lookup individual
command full paths at the beginning. I think there are already tools and
standard "script libraries" to do that for you.

Of course you are going to jump and say that scripts can't guess the right
value for PATH, but that depends on the situation - if it's a global script
then usually
it should relay on globally available programs anyway. If it's something
"local for
the group" or something then even more so it can know which components
should
go in the path.  Even if you are writing the script for your own private use
I still
recommand that you set the PATH because you never know what's going to be in
it (e.g. scripts invoked via ssh and such or other situations where the
"normal" path
settings do not happen).

--Amos

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to