Index | Thread | Search

From:
Todd C. Miller <millert@openbsd.org>
Subject:
Re: awk.1: Fix description of getline
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
tech@openbsd.org
Date:
Tue, 24 Dec 2024 15:09:46 -0700

Download raw body.

Thread
On Tue, 24 Dec 2024 22:58:51 +0100, Christian Weisgerber wrote:

> In awk.1, the description of the various forms of the getline
> function is confused.  _The AWK Programming Language_, second
> edition, sums it up in this table (p. 204):
>
>        TABLE A-10. GETLINE FUNCTION
>     ===================================
>         Expression    |      Sets
>     ------------------+----------------
>     getline           | $0, NF, NR, FNR
>     getline var       | var, NR, FNR
>     getline <file     | $0, NF
>     getline var <file | var
>     cmd | getline     | $0, NF
>     cmd | getline var | var
>     ------------------+----------------
>
> Here's a minimal diff to rectify the description.

Probably a cut and paste error originally.  Your diff is a reasonable
way to fix it and looks correct to me.  OK millert@

 - todd