GNU bug report logs - #76290
"sort -u" vs "sort -h -u": possible bug

Previous Next

Package: coreutils;

Reported by: Rupert Gallagher <ruga <at> protonmail.com>

Date: Fri, 14 Feb 2025 17:01:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Rupert Gallagher <ruga <at> protonmail.com>
Cc: "76290 <at> debbugs.gnu.org" <76290 <at> debbugs.gnu.org>
Subject: Re: "sort -u" vs "sort -h -u": possible bug
Date: Sun, 16 Feb 2025 14:22:48 -0800
On 2025-02-16 03:02, Rupert Gallagher wrote:
> The introduction of the unique operator (-u) returns a wrong answer when used with the human sorting operator (-h).

The answer is "wrong" only in the sense that sort's documented and 
implemented behavior is not what you expect.

To fix this mismatch between behavior and expectations, don't use -h. It 
makes sense to not use -h, -h is not intended for uses like that.




This bug report was last modified 92 days ago.

Previous Next


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