Path: utzoo!attcan!uunet!husc6!mailrus!uflorida!haven!adm!xadmx!rbj@nav.icst.nbs.gov From: rbj@nav.icst.nbs.gov (Root Boy Jim) Newsgroups: comp.unix.wizards Subject: Echo Message-ID: <17951@adm.BRL.MIL> Date: 23 Dec 88 00:57:38 GMT Sender: news@adm.BRL.MIL Lines: 36 ? From: Doug Gwyn ? In article <949@riddle.UUCP> domo@riddle.UUCP (Dominic Dunlop) writes: ? > In release 4.0, the echo command has been enhanced to support both the ? > SunOS and UNIX System V version of the command. echo automatically ? > selects between the two definitions according to the value of the PATH ? > variable. The UNIX System V definition is the default definition. ? > However, if the PATH contains the entry /usr/ucb, and that entry comes ? > before /usr/bin, then the SunOS version of echo is selected. ? What a botch this is! Nobody I know of puts /usr/ucb before /usr/bin ? even on native BSD systems. I wouldn't risk that in shell scripts, ? either, so in effect they have added a mechanism that will be of no ? practical use. And, there is STILL no way to disable \-escape mapping ? in the System V environment. Sorry, Doug, /usr/ucb comes first by default. It has to, otherwise you'd end up running /bin/mail when you typed mail. In 4.2, /usr/bin also contained the old version of the man command, which did not pipe thru more, was a shell script, and probably didn't even work. There are also two versions of grep, one in /bin, one in /usr/ucb. What's the difference? Who cares? I use egrep all the time anyway. In my experience, only inexperienced users put /usr/ucb last. As it turns out, $PATH is set by login, not csh. However, I do agree this is a botch. I vote for your version of echo. And choosing between /usr/bin and /usr/ucb seems wrong. I would think that the choice should be made based on /bin or /5bin. (Root Boy) Jim Cottrell (301) 975-5688 or Crackers and Worms -- Breakfast of Champions!