bug-coreutils
[Top][All Lists]
Advanced

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

bug#18168: Bug in "sort -V" ?


From: Schleusener, Jens
Subject: bug#18168: Bug in "sort -V" ?
Date: Fri, 1 Aug 2014 11:38:39 +0200 (CEST)
User-agent: Alpine 2.19.9991 (LSU 64 2014-05-31)

Hi,

I am not sure if it's a bug or not but for my application cases the "sort" command with use of the very helpful option "-V" (natural sort of (version) numbers within text) not always delivers the by me expected output.

Example input file (with four test cases):

1.0.5_src.tar.gz
1.0_src.tar.gz
2.0.5src.tar.gz
2.0src.tar.gz
3.0.5/
3.0/
4.0.5beta/
4.0beta/

Sorted ("sort -V") output file (with errors?):

1.0.5_src.tar.gz
1.0_src.tar.gz
2.0src.tar.gz
2.0.5src.tar.gz
3.0.5/
3.0/
4.0beta/
4.0.5beta/

By me expected output file:

1.0_src.tar.gz
1.0.5_src.tar.gz
2.0src.tar.gz
2.0.5src.tar.gz
3.0/
3.0.5/
4.0beta/
4.0.5beta/

You see that the sort works correctly if after the [0-9\.]* part follows
a alphabetic character but not if follows a non-alphabetic character like a slash or an underscore.

Regards

Jens





reply via email to

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