Subject: Re: echo -e flag
To: Alistair Crooks <email@example.com>
From: Mark Valentine <firstname.lastname@example.org>
Date: 10/04/2003 15:48:57
> From: email@example.com (Alistair Crooks)
> Date: Tue 9 Sep, 2003
> Subject: Re: echo -e flag
[Sorry, I'm coming in late here but I'm currently looking at the whole
echo/printf mess with a view to the current standard.]
> The echo that's built into /bin/sh on -current recognises -e and DTRT:
It seems that IEEE Std 1003.1-2001 does not permit a conformant echo(1)
implementation to have options (except for special case handling of -n
in more recent versions of the standard).
Also, NetBSD's sh(1) manual page defers to echo(1) for documentation,
yet echo(1) and sh(1) echo do not behave the same (echo(1) _does_ conform
to the standard).
Should the implementations be aligned, and/or should we fix the documentation
to note the non-conformance? (I'm of the opinion that, since it seems to be
hard enough getting printf %b to do the right thing, attempting to have echo
-e duplicate it at the expense of non-conformance is a waste, but we clearly
also have to address existing usage to some extent.)
Note that I have some related fixes for printf(1) which I'll submit once
I've put together a system for testing (I got into this whole mess trying
to fix FreeBSD's sh(1) so that it can host a NetBSD cross-build).
"Tigers will do ANYTHING for a tuna fish sandwich."
"We're kind of stupid that way." *munch* *munch*