GNU bug report logs - #47103
numfmt: invalid suffix 'k'

Previous Next

Package: coreutils;

Reported by: Daniel Callejas Sevilla <daniel.callejas.sevilla <at> gmail.com>

Date: Fri, 12 Mar 2021 16:18:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Golden <gdg <at> zplane.com>
To: Sven Köhler <sven.koehler <at> gmail.com>
Cc: 47103 <at> debbugs.gnu.org, Pádraig Brady <P <at> draigbrady.com>
Subject: bug#47103: numfmt: invalid suffix 'k'
Date: Sun, 26 Nov 2023 10:12:13 -0700
Sven Köhler <sven.koehler <at> gmail.com> [2023-11-26 17:09:23 +0100]:
> So Pádraig's patch does allow for parsing lowercase k, but it does not
> change numfmt to use lowercase k in its output in si mode.
> 
> As Pádraig has shown, ls uses lowercase k in --si mode. So it uses lowercase
> k for 1000. I think that numfmt should behave the same for consistency
> reasons.
> 
> Also, the texinfo then seems incomplete. It lists kB but not k alone, as
> used by ls in --si mode.
> 

Danger Will Robinson...  The situation w.r.t. B vs. B-less is more complicated
than that; the texinfo doc is (and has been for years) self-contradictory
regarding the semantics of B vs. B-less suffixes. It just depends which
section you happen to refer to.

This thread from a few years back lays out the B-vs.-no-B confusion in
gory detail:

    https://lists.gnu.org/archive/html/coreutils/2020-09/msg00001.html

NOTE: The above was posted in 2020 when coreutils 8.32 was current; the
texinfo sections referred to in the initial message of that thread have
changed: In particular, the section referred to in the above thread as
"Section 2.3 "Block size" is now Section 2.2 of the present (coreutils 9.4)
texinfo.

Glenn




This bug report was last modified 1 year and 179 days ago.

Previous Next


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