On 2003-02-23, [EMAIL PROTECTED] wrote:

> > -----Original Message-----
> > From: Beni Cherniavsky
> > Sent: Sunday, February 23, 2003 2:54 PM
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: Problem with Pth or make or what?
> >
> > Good advice.  Indeed a quick grep of scripts in /usr/bin shows most
> > reset the path.  I was refering to my own ~/bin scripts and shell
> > aliases where I'm too lazy to do it.  Perhaps I'm wrong but PATH is
> > intended to avoid typing the full pathes, not to bring the need back.
>
> You are right - but once you set the $PATH you can relay on it and use
> "relative" program names.  Or what many (more "robust") scripts do is to
> lookup the individual programs and set a script variable for each one of
> them (e.g. "$AWK = lookup(awk)" then use $AWK everywhere in the script).
>
> As for laziness - it might cause you a headache one day when your
> environment changes or you want to copy it over to somewhere else,
> better maintain it now.
>
[OT] I wonder what was Plan9's answer to this problem.  They have cool
many-to-one "union mounts", so you don't have a PATH environment variable
at all, everything you need is mapped into /bin (plan9 also has
per-process mounts).  So there is about zero chance to know exactly where
to lookup trustable programs, it's designed assuming you setup it
sensibly.  But then plan9 has no suid bits, IIRC, so the security dangers
are smaller.

-- 
Beni Cherniavsky <[EMAIL PROTECTED]>

The mind of a good coder knows what his computer would do for any of his
programs.  The computer of a good hacker knows what his mind would do if
it weren't for his programs.

=================================================================
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