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