bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error in Info example.


From: Aharon Robbins
Subject: Re: Error in Info example.
Date: Wed, 23 Feb 2005 15:19:39 +0200

Greetings. Re this:

> Date: Sun, 13 Feb 2005 18:40:44 -0500
> From: "Mark M. Henwood" <address@hidden>
> Subject: Error in Info example.
>
> The example at Gawk:Reading Files:Changing Fields is incorrect.  The field
> identifier should be $2 to get the output shown in the example.
>
> Presently Reads:
>
> $ awk '{ nboxes = $3 ; $3 = $3 - 10
> >        print nboxes, $3 }' inventory-shipped
>
> Should Read:
>
> $ awk '{ nboxes = $2 ; $2 = $2 - 10
> >        print nboxes, $2 }' inventory-shipped
>
> Again, this change is only needed so that the output when run matches the
> numbers given in the info document.
>
> Mark M. Henwood

I looked at this.  The info file is correct as it stands. Earlier, in the node
`Sample Data Files', the document says:

        The data file `inventory-shipped' represents information about
        shipments during the year.  Each record contains the month, the
        number of green crates shipped, the number of red boxes shipped,
        the number of orange bags shipped, and the number of blue packages
        shipped, respectively.  There are 16 entries, covering the 12
        months of last year and the first four months of the current year.

The number of boxes is thus the third field, $3.

Thanks,

Arnold




reply via email to

[Prev in Thread] Current Thread [Next in Thread]