Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!hao!boulder!sunybcs!bingvaxu!leah!uwmcsd1!bbn!papaya.bbn.com!rsalz From: rsalz@bbn.com (Rich Salz) Newsgroups: comp.sources.d Subject: Re: "unportable" shar scripts (Was: A Quick "How-To") Message-ID: <228@papaya.bbn.com> Date: Thu, 29-Oct-87 10:29:53 EST Article-I.D.: papaya.228 Posted: Thu Oct 29 10:29:53 1987 Date-Received: Tue, 3-Nov-87 04:15:27 EST References: <787@uokmax.UUCP> <4945@ncoast.UUCP> <1815@ho95e.ATT.COM> Reply-To: rsalz@bbn.com (Rich Salz) Organization: BBN Laboratories, Cambridge MA Lines: 32 Summary: I don't think they are Someone complained about seeing PATH=/bin:/usr/bin:/usr/ucb ; export PATH in shar scripts, particularly calling out comp.sources.unix. He asks if it's a standard shar that's doing this, and would prefer to see PATH=/bin:/usr/bin:/usr/ucb:$PATH ; export PATH Disclaimer: I'm the moderator of comp.sources.unix, and I wrote a set of shar/unshar/makekit tools that lots of people seem to be using (tell-tale clue: if the script has a "-c" trick it's my stuff). I am very concerned and aware of the distribution problems and mechanisms behind wide-spread source publication (i.e., "I've gotten more BITNET failure messages than you have!" :-) I claim that for a shell script to really be portable, it had better use only programs found in /bin or /usr/bin. I haven't seen any scripts that particularly needed /usr/ucb, but I don't see the harm. Adding other directories doesn't make any sense because they're too unstandard: I've seen /usr/local, /usr/local/bin, /usr/unsupported, and here we use /usr/bbn a lot. Prepending the existing PATH is wrong, because the whole purpose is to get standard commands (I guarantee you that "/usr/bbn/ls -l" doesn't look like any "ls -l" you're used to. :-) In short, there's probably no benefit, and there's definitely no harm, so what's the gripe? And while I'm here, let me just point out that if people have comments or opinions on comp.sources.unix, the best medium is direct email to me at sources@uunet.uu.net; the odds of my seeing a public posting -- let alone responding -- are pretty slim, trust me. /Rich $alz, moderator thereof -- For comp.sources.unix stuff, mail to sources@uunet.uu.net.