bug-coreutils
[Top][All Lists]
Advanced

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

bug#22455: sort-V not sorting correctly when minor version decimal place


From: Vashti
Subject: bug#22455: sort-V not sorting correctly when minor version decimal places differ
Date: Sun, 24 Jan 2016 12:54:57 +0000

Hi, I'm having an issue with a script using coreutils 8.25. Asked to sort
two version numbers, 8.49 and 8.5, it returns them in the wrong order, with
the lowest value second:

$ echo -e '8.49\n8.5' | sort -V
8.5
8.49

I can produce the expected behaviour by correcting the second version
number to two decimal places:

$ echo -e '8.49\n8.50' | sort -V
8.49
8.50

I understand that sort -V is not reliable in all cases, but this seems like
quite a straightforward one.

Thank you.


reply via email to

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