[Top][All Lists]

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

bug#35939: version sort is incorrect with hyphen-minus

From: Florian Weimer
Subject: bug#35939: version sort is incorrect with hyphen-minus
Date: Fri, 28 Jun 2019 21:18:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

* Vincent Lefevre:

> On 2019-06-26 18:40:50 -0700, Paul Eggert wrote:
>> Perhaps the coreutils manual could be improved to make this all clearer, and
>> perhaps it should refer to the Debian manual if it doesn't already.
> In this case, there should be a new ordering option to provide
> true numeric sort with strings mixing non-negative integers and
> characters.

There's no one true numeric sort.  Some versioning schemes interpret
numbers after a dot as decimal fractions (so that 1.9 > 1.10), but it's
more common to split version strings into tuple somehow and then sort
the non-numeric parts lexicographically, and the numeric parts as
integers (so that 1.9 < 1.10).


reply via email to

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