echo -[ne] and escapes

Doug Gwyn gwyn at brl-smoke.ARPA
Thu Jun 16 19:00:12 AEST 1988


In article <11970 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>What does POSIX say about echo?

That's in 1003.2's domain.  I can't find my copy of the current draft,
but as of draft 3, "echo" was modeled after the SVR2 version.  That is,
it always mapped \ escapes and had no way to disable this.  Obviously
that is a serious botch.

I haven't been able to attend recent 1003.2 meetings.  At an early
one (Dec. 1986), I distributed my idea of the proper command set,
which was arrived at by going through SVID2 and deciding what was
necessary for shell programming.  Examples:

echo	Either provide an option to disable escape sequences, or else
	require the 8th Edition UNIX -e option to enable them.

od	Delete; system-dependent and poorly specified.

sort	Delete -y and -z options and reword -i option description to
	apply to generic character sets, not just ASCII.

Instead, 1003.2 adopted Lorraine Kevra's large SVID2-based command
list (with lots of categories!) as a starting point, without worrying
about subsets of the SVID-defined options.  Also, as one might expect,
the list has been getting fatter as people have lobbied for their
favorite cruft to be added.

This is an ideal opportunity to clean up the UNIX utility hodge-podge.
I think 1003.2 is blowing it...

My father (a chemical engineer) once taught me a valuable lesson.
He gave me a draft of a technical paper to review, and requested
that I slash out about half the words.  What was amazing to me was
that not only was it possible to do that without loss of useful
information, but also a much better paper resulted!



More information about the Comp.unix.wizards mailing list