Please DO use "/bin/test" as a command name

Ron Wessels ron at uthub.UUCP
Mon Dec 9 17:51:45 AEST 1985


>From: ian at utcs.uucp
>Subject: Please do NOT use "/bin/test" as a command name
>Message-ID: <1019 at utcs.uucp>
>
> No, no, no. Do not use absolute paths for test, mv, cp, or
> anything else. Least of all in shell files.  ...
> 					    ....it violates the 
> portability principle: UNIX uses the PATH environment variable
> to find programs, rather than making the user specify full path names
> for programs. This allows you to write your own. ...
> ...
> You don't know what might motivate me to have my own version of rm
> ...

There's one small problem with that, Ian.  People writing "portable"
shell files don't know the behaviour of *your* rm (for example).  What
flags does it take?  Does it support the same ones as /bin/rm?  Does it
behave similarly? I know some people that move rm'ed files to their own
private pergatory, in case they ever want them back.  Others have their
own "rm" that does a "/bin/rm -i".  A lot of otherwise-correct shell
files will behave very strangely if they use this non-standard version.
In short, /bin/rm is the only one that the shell-file writer can trust
to execute as s/he expects, and so should be the one invoked.
-- 
Ron Wessels	Computer Systems Research Institute	University of Toronto
UUCP:	{decvax,floyd,ihnp4,linus,utzoo,uw-beaver}!utcsri!ron
CSNET:	ron at Toronto
ARPA:	ron%Toronto at CSNet-Relay



More information about the Comp.unix.wizards mailing list