Environment variables: please use (V - (nf)

notes at fortune.UUCP notes at fortune.UUCP
Thu Nov 10 11:07:54 AEST 1983


#R:utcsstat:-140400:fortune:11600027:000:928
fortune!olson    Nov  9 16:11:00 1983

I have been guilty of this in the past also.  It usually seems
silly/inexcusable to use full path names, especially if you are doing
an execlp(), popen(), system(), etc.  However, in the case of 4.1 BSD,
there are, for example, 2 versions of ls, mail, grep, ... Usually one
is the bell labs version and one is BSD, and the features and options
are different.  If you happen to be relying on a feature of a
particular program, you obviously don't want to use whatever the user
has chosen.  It is often desirable to be sure that you are not getting
something a user has in their local bin, which happens to have the
same name as one of the `standard' commands.  In addition, a lot of
users will not have the variable set, so one has to choose some sort of
default anyway.  Even more to the point, local conventions of what
environmental variables are meaningful vary.
	Dave Olson, Fortune Systems {ihnp4|harpo|hpda}!fortune!olson



More information about the Comp.unix.wizards mailing list