Then, the option name causes misunderstand. -V is actually
--debian-version. And it is not natural order (there is no such thing
like extension handling with natural order). The natural order is
plain and simple, just as what is explained below, which can be
implemented by a few lines of python code.

https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/

So my question is whether natural order as in the above URL is supported?

On 10/8/19, Assaf Gordon <assafgor...@gmail.com> wrote:
> 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
>
>


-- 
Regards,
Peng

Reply via email to