coreutils
[Top][All Lists]
Advanced

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

Re: Is natural sort supported?


From: Assaf Gordon
Subject: Re: Is natural sort supported?
Date: Tue, 8 Oct 2019 00:58:43 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Hello,

On 2019-10-08 12:36 a.m., Peng Yu wrote:
The following example shows that version sort is not natural sort. Is
natural sort supported in by `sort`?

There is no such thing as "THE correct natural sort" order...

$ printf '%s\n' 1G13 1.02 | LC_ALL=C sort -k 1,1V # The result order
should have been reversed.

... therefore "should have" is simply incorrect expectation.

You might think it "should" be one way, and other implementations
think it "should" be another way.

For more details, please see the attached HTML file for details.

(this HTML file is a new chapter of the coreutils manual that will be
included in the next release. The source texinfo is here:
https://git.savannah.gnu.org/cgit/coreutils.git/tree/doc/sort-version.texi ).

regards,
 - assaf

Attachment: sort-version.html
Description: Text document


reply via email to

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