bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "prints a surprising 1" cannot be reproduced


From: arnold
Subject: Re: "prints a surprising 1" cannot be reproduced
Date: Mon, 07 Dec 2020 00:49:30 -0700
User-agent: Heirloom mailx 12.5 7/5/10

Hi.

Thanks for the report. This is a documentation bug. The behavior changed
(as Nelson pointed out) at gawk 4.2.0 in 2015, due to changes in POSIX.

I will fix the documentation.

Arnold

Arkadiusz Drabczyk <arkadiusz@drabczyk.org> wrote:

> In gawktexi.in it says
>
> "the following (extreme) pipeline prints a surprising @samp{1}:
>
> @example
> $ @kbd{echo | gawk --posix 'BEGIN @{ RS = "a" @} ; @{ print NF @}'}
> @print{} 1
> @end example
> "
>
> But I cannot reproduce it with gawk built from today's master branch:
>
> $ echo | ./gawk --posix 'BEGIN { RS = "a" } ; { print NF}'
> 0
>
> Is this a bug in the docs or am I doing something wrong?
>
> -- 
> Arkadiusz Drabczyk <arkadiusz@drabczyk.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]