On 19/01/2021 19:31, Richard Kettlewell wrote:
> Agreed. It is easy to reproduce.
>
> $ (seq 9999 | head -c 4095; sleep 2; echo) | mawk '{print}'
>
Thanks for the seq example, simple, informative. I had seen that (or
similar) done before, but couldn't quite remember/figure it out myself,
I actually tried yesterday.
[snip]
>
> I have no idea what the benefit of the latter policy is, it seems to
> make the code a lot more complicated for no clear gain (and it breaks
> your use case). It’s plainly deliberate, so in that sense not a bug,
> although it seems like a bizarre design decision to me.
>
Naively, I would guess prioritising performance for big files, as the
default.
>>>> I'm using Raspbian Buster, default awk is mawk 1.3.3.
> [...]
>> Fedora 32 for these tests, which uses awk 5.0.1 - The Buster awk is very
>> old, so raising a bug requesting an upgrade to the latest awk may be a
>> good idea.
>
> There is no such thing as mawk 5.0.1, Fedora is presumably using GNU Awk
> (which also available in Debian and its derivatives). These are totally
> different programs and it does not make any sense to compare their
> version numbers.
>
To be fair, until this thread there was just awk, as far as I was
concerned, which is why I see different implementations as fragile.
It looks as if Ubuntu recently swapped default awk from mawk to gawk.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|