Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: echo Message-ID: <688@auspex.UUCP> Date: 12 Dec 88 18:35:36 GMT References: <6557@june.cs.washington.edu> <949@riddle.UUCP> <9128@smoke.BRL.MIL> <675@auspex.UUCP> <9145@smoke.BRL.MIL> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 60 >But this is so well-known to be idiotic that everyone I know of sets his >own PATH in his .profile. Some people do so by prepending or appending to their $PATH, in which case they'd get "/usr/ucb" first on a BSD system. I set mine up explicitly, but I still stick "/usr/ucb" in front of "/bin" and "/usr/bin". >Even in a pure 4BSD environment, you will notice, I don't put /usr/ucb >ahead of /bin and /usr/bin. There are several reasons for this, but the >main ones are ... and standard environment (since /usr/ucb/grep etc. are >usually brain-damaged). Well, it appears the problem here is that in a S5/BSD environment, some BSD commands may be brain-damaged and some S5 commands may be brain-damaged (namely, "echo"). That's unfortunate, but that's life. >Yes, and even 4BSD shell scripts normally include something like > PATH=/bin:/usr/bin:/usr/ucb export PATH >(Again, getting the wrong version of "echo" under SVR4.0.) And the wrong version of "tr", and the wrong version of.... If there's a problem, it's not a problem with "echo" alone. >> ... the rules will be "put '/usr/ucb' at the front if you expect >> BSD-style versions, and put it at the end or leave it out if you don't. > >Unfortunately this reversal of the /usr/5bin approach doesn't work >right. There should have been a separate /usr/bsdbin or such to >contain the BSD compatibility versions of utilities; /usr/ucb is >already in use WITH A DIFFERENT MEANING. Perhaps. Given items such as "/usr/ucb/grep" (and "/usr/ucb/mail"), "/usr/ucb" has, at least in part, the meaning "place where Berkeley-modified variants of UNIX utilities live". It no longer has the meaning "place where Berkeley-written utilities live", since some of them don't live there - "csh" being one example.... It's not clear *WHAT* the meaning of "/usr/ucb" is. >But as you can see, the problem with this approach is that it encourages >further delay in FIXING the broken System V "echo" behavior. The primary goal of the SunOS S5 environment was to enable people to import programs and programmers from an S5 environment. Sorry, but getting "echo" fixed would, at best, have been a secondary goal. >Instead of working to fix design errors via transition to better designs, The first problem is convincing vendors that there is a design error. *I* agree that the PWB/UNIX 1.0 "echo" should have had the ability to turn off escape sequences; however, you're not likely to get this fixed until you convince either 1) the UNIX development group at AT&T or 2) some organization with the clout to convince the UNIX development group at AT&T that there's a problem. >vendors seem to be accreting all the misfeatures ever used by anybody.. Unfortunately, for better or worse, people actually use and start to depend on misfeatures; I wish it didn't happen, but sometimes it does, which means it's difficult at best, and perhaps impossible, to get rid of some of those misfeatures.