On Thu, Oct 19, 2017, at 10:33, Steffen Nurpmeso wrote:
Random832 <random832(a)fastmail.com> wrote:
|On Wed, Oct 18, 2017, at 19:03, Doug McIlroy wrote:
|>> But mind you, in preparation of this email i found a bug in
|>> Busybox sed(1) which simply echoes nothing for the above.
|>
|> I assume that * is a typo for - . If so, sed did just what
|> -n tells it to--no printing except as called for by p or P.
|
|Or, you know, l (the letter ell). Which busybox sed appears to not
|support at all, rather than somehow misapplying -n to it.
The letter l, yes. But it does not fail either, so it knows about
it, talking version 1.27.something here.
If you look at the source, it is in the list that is checked for
printing (or not) the 'unsupported command' error message, but there is
no actual code to handle it (and when called *without* -n, it just falls
through and prints once, just like if you'd had no command at all)
https://git.busybox.net/busybox/plain/editors/sed.c?h=1_3_stable
I think that makes this a legitimate bug in busybox, rather than simply
an artifact of being a minimal tool that doesn't aim for posix (or
historical unix) conformance.