🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by David MacKenzie Sun, 16 Apr 1989 04:22
Gawk 2.10 getline is broken
#1567
Author: David MacKenzie
Date: Sun, 16 Apr 1989 04:22
17 lines
826 bytes
Run the following script:

#!/bin/sh
gawk '
BEGIN {
  while (getline < "'$0'" > 0)
    printf("FNR=%s, NR=%s, NF=%s, line=%s\n", FNR, NR, NF, $0)
  exit
}'

According to page 61 of the AWK Programming Language, getline has the side
effects of setting NR, FNR, and (if no variable argument is given) NF.
Gawk 2.10 beta sets only NF.

David MacKenzie
mackenzi@thor.stolaf.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads