Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Arnold D. Robbins
Mon, 24 Apr 1989 18:25
gawk bug not a bug
Author: Arnold D. Robbins
Date: Mon, 24 Apr 1989 18:25
Date: Mon, 24 Apr 1989 18:25
37 lines
1497 bytes
1497 bytes
Just to "unsully" our reputation a little bit... :-)
--- Forwarded mail from cs.dal.ca!david
>From cs.dal.ca!david Mon Apr 24 14:12:23 1989
To: mackenzi@thor.acc.stolaf.edu (David MacKenzie)
Cc: arnold@emoryu1.UUCP (Arnold D. Robbins)
Subject: Re: from gnu bugs, #1
In-Reply-To: Your message of Mon, 17 Apr 89 17:56:54 EDT.
<8904172156.AA02810@emoryu1.cc.emory.edu>
Date: Mon, 24 Apr 89 10:48:52 AST
From: cs.dal.ca!david
In your message of Mon, 17 Apr 89 17:56:54 EDT you write:
> Subject: Gawk 2.10 getline is broken
>
> 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.
But on page 62 you will find that if the getline input is redirected from
a file, then FNR and NR are untouched.
--- End of forwarded message from cs.dal.ca!david
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