Echo
Kenneth Almquist
ka at june.cs.washington.edu
Thu Dec 1 00:18:11 AEST 1988
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
More information about the Comp.unix.wizards
mailing list