Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site rayssd.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!rayssd!gmp From: gmp@rayssd.UUCP (Gregory M. Paris) Newsgroups: net.unix-wizards Subject: Re: Please do NOT use "/bin/test" as a command name Message-ID: <1615@rayssd.UUCP> Date: Tue, 10-Dec-85 20:42:49 EST Article-I.D.: rayssd.1615 Posted: Tue Dec 10 20:42:49 1985 Date-Received: Thu, 12-Dec-85 04:47:55 EST References: <313@bdaemon.UUCP> <13400016@mirror.UUCP> <1016@sdcsla.UUCP> <1019@utcs.uucp> Sender: gmp@rayssd.UUCP (Gregory M. Paris @ Raytheon Co., Portsmouth RI) Organization: Raytheon Co., Portsmouth RI Lines: 26 > No, no, no. Do not use absolute paths for test, mv, cp, or > anything else. Least of all in shell files. > > Sure, once in a while a new user will make a program called `test' > and get confused. Some people even do it twice (I did). Most > people don't do it a third time. As you mentioned, this kind of problem crops up not only with "test" but with many of the oft-used UNIX utilities. For those of us that support a user community of hundreds, even one or two "custom" utility problems per user can become quite a time consuming hassle. Just about any shell script can be broken with custom utilities, and I certainly don't expect every user to have the savvy to figure out which ones his/her new "rm" command is going to break (try rm -i -f). There's more than a speed advantage to including full pathnames, and only very minor portability problems associated with the practice. I'm not saying that you *must* or even *should* include full pathnames, but I disagree completely with your saying *never*! As a compromise, how about setting PATH at the beginning of the script? -- ++---------------------------------------------------------------------------++ || Greg Paris {allegra,linus,raybed2,ccice5,brunix}!rayssd!gmp || ++---------------------------------------------------------------------------++