[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"prints a surprising 1" cannot be reproduced
From: |
Arkadiusz Drabczyk |
Subject: |
"prints a surprising 1" cannot be reproduced |
Date: |
Sun, 6 Dec 2020 21:48:23 +0100 |
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>
- "prints a surprising 1" cannot be reproduced,
Arkadiusz Drabczyk <=