Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!srcsip!nic.MR.NET!thor.acc.stolaf.edu!mackenzi From: mackenzi@thor.acc.stolaf.edu (David MacKenzie) Newsgroups: gnu.utils.bug Subject: Gawk 2.10 getline is broken Message-ID: <1860@thor.acc.stolaf.edu> Date: 16 Apr 89 04:22:04 GMT Reply-To: mackenzi@thor.stolaf.edu (David MacKenzie) Distribution: na Organization: Environmental Defense Fund Lines: 17 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