procmail
[Top] [All Lists]

$PATH vs variables for executables

1999-10-31 17:30:17
When I said,

T> BTW, I'm greatly in favor of setting PATH and calling executables by their
T> basenames over setting variables for every executable's absolute path and
T> invoking them all by their variables.

Rejo asked,

Z> Why is that?

A number of reasons.  First, remember that I am a user on the systems where I
run procmail, not a sysadmin.  If the sysadmin reorganizes the binary direc-
tories, all I have to do is fix the assignment of PATH in .procmailrc (or if
I'm running a private copy of procmail, recompile it with the new $PATH); if
I used variables, I'd have to change every one of the assignments.

If I find a better version of the program and put it into ~/priority, by
using PATH it will get called automatically; if I used variables, I'd have
to edit the new absolute path for it into my .procmailrc as well.

Also, since my .procmailrc's $PATH is just a couple directories prepended and
appended to procmail's compiled-in $PATH, it takes a lot less typing to as-
sign PATH than to assign all the variables for all the executables when I
first put together an rcfile.

Finally, it's a hell of a lot easier to type the names formail, cat, sed,
fgrep, gzcat, and such rather than $FORMAIL, $CAT, $SED, $FGREP, $GZCAT, and
the like every time I have a recipe that runs a program or a backquote sub-
stitution.  Of course there's no real need to use capital letters in the 
names, but everybody who takes that route uses caps.