GNU bug report logs - #26519
Documentation for cut --fields=field-list giving faulty info on awk

Previous Next

Package: coreutils;

Reported by: Bo Rydberg <bolry <at> hotmail.com>

Date: Sat, 15 Apr 2017 16:25:02 UTC

Severity: minor

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26519 in the body.
You can then email your comments to 26519 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#26519; Package coreutils. (Sat, 15 Apr 2017 16:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bo Rydberg <bolry <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 15 Apr 2017 16:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bo Rydberg <bolry <at> hotmail.com>
To: "bug-coreutils <at> gnu.org" <bug-coreutils <at> gnu.org>
Subject: Documentation for cut --fields=field-list giving faulty info on awk
Date: Fri, 14 Apr 2017 16:24:47 +0000
[Message part 1 (text/plain, inline)]
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.

[Message part 2 (text/html, inline)]

Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Mon, 17 Apr 2017 02:13:02 GMT) Full text and rfc822 format available.

Notification sent to Bo Rydberg <bolry <at> hotmail.com>:
bug acknowledged by developer. (Mon, 17 Apr 2017 02:13:02 GMT) Full text and rfc822 format available.

Message #10 received at 26519-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Bo Rydberg <bolry <at> hotmail.com>, 26519-done <at> debbugs.gnu.org
Subject: Re: bug#26519: Documentation for cut --fields=field-list giving
 faulty info on awk
Date: Sun, 16 Apr 2017 19:12:07 -0700
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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 15 May 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 347 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.