Subject: bug#26519: closed (Re: bug#26519: Documentation for cut --fields=field-list giving faulty info on awk)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 17 Apr 2017 02:13:02 +0000

Your bug report

#26519: Documentation for cut --fields=field-list giving faulty info on awk

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
26519: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26519
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#26519: Documentation for cut --fields=field-list giving faulty info on awk
From: Pádraig Brady <[email-masked]>
To: Bo Rydberg <[email-masked]>, [email-masked]
Date: Sun, 16 Apr 2017 19:12:07 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On 14/04/17 09:24, Bo Rydberg wrote:
> As seen at https://www.gnu.org/software/coreutils/manual/html_node/cut-invocation.html, the section for ‘-f field-list’
> ‘--fields=field-list’ hints at some examples of using awk. The second example is wrong. it states:
> awk '{print $NF-1}' # print the penultimate field
> when it should be
> awk '{print $(NF-1)}' # print the penultimate field
> i.e., parenthesis missing.

Indeed. I guess that was tested with echo 1 2 3 :)
Committed in your name at:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.27-22-g8d34b45

thanks,
Pádraig

Subject: Documentation for cut --fields=field-list giving faulty info on awk
From: Bo Rydberg <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Fri, 14 Apr 2017 16:24:47 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

As seen at https://www.gnu.org/software/coreutils/manual/html_node/cut-invocation.html, the section for ‘-f field-list’
‘--fields=field-list’ hints at some examples of using awk. The second example is wrong. it states:
awk '{print $NF-1}' # print the penultimate field
when it should be
awk '{print $(NF-1)}' # print the penultimate field
i.e., parenthesis missing.