Comment 2 for bug 287948

Revision history for this message
Adrian Bunk (bunk) wrote :

This is fixed in 4.1.3-0.1 (in xenial and later), it now says:

   Using an alphabetic character such as 'u' for the record separator is
highly likely to produce strange results. Using an unusual character
such as '/' is more likely to produce correct behavior in the majority
of cases, but there are no guarantees. The moral is: Know Your Data.

   When using regular characters as the record separator, there is one
unusual case that occurs when 'gawk' is being fully POSIX-compliant
(*note Options::). Then, the following (extreme) pipeline prints a
surprising '1':

     $ echo | gawk --posix 'BEGIN { RS = "a" } ; { print NF }'
     -| 1