Path: utzoo!utgpu!watmath!clyde!att!mtuxo!mtgzz!avr From: avr@mtgzz.att.com (a.v.reed) Newsgroups: comp.unix.wizards Subject: Re: Echo Summary: Read Bolsky and Korn Message-ID: <4712@mtgzz.att.com> Date: 1 Dec 88 22:50:54 GMT References: <6557@june.cs.washington.edu> Organization: AT&T, Middletown NJ Lines: 29 In article <6557@june.cs.washington.edu>, ka@june.cs.washington.edu (Kenneth Almquist) writes: < I've been implementing a public domain shell and I'm wondering what to < do about the echo builtin. The System V echo command interprets a number < of escape sequences (e.g. \n for newline) which the BSD echo does not, < so I can... < < 1. Implement the System V echo on the grounds that it will make it easier < to run System V shell scripts. < < 2. Implement the BSD echo on the grounds that it's the "right" approach < (since the System V echo is useless if you want to echo an arbitrary < string unchanged). < < 3. Don't provide an echo builtin, so users get whatever echo command is < installed in /bin. This follows the principle of least surprise, but < it makes shell scripts run slowly and does nothing for portability. < < Any suggestions? In particular I would like to know if any standards < organizations have addressed the semantics of echo. Does anyone know < what the merged AT&T/SUN UNIX is going to do about echo? < Kenneth Almquist Dave Korn's approach was to do a new builtin, print, with options to emulate either "echo". "Echo" is initially aliased to work like the local /bin/echo, whichever one that happens to be, but with the user having the option to change it to his/her preference. I recommend Bolsky and Korn's "KORNSHELL" book for details. Adam Reed (avr@mtgzz.att.com)