From mboxrd@z Thu Jan 1 00:00:00 1970 From: random832@fastmail.com (Random832) Date: Thu, 19 Oct 2017 10:41:45 -0400 Subject: [TUHS] basic tools / Universal Unix In-Reply-To: <20171019143309.SCysT%steffen@sdaoden.eu> References: <201710182303.v9IN35Bv030527@coolidge.cs.Dartmouth.EDU> <1508385233.3734780.1143734600.41F5D5EE@webmail.messagingengine.com> <20171019143309.SCysT%steffen@sdaoden.eu> Message-ID: <1508424105.2409028.1144261928.5FC3332C@webmail.messagingengine.com> On Thu, Oct 19, 2017, at 10:33, Steffen Nurpmeso wrote: > Random832 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.