On Wed December 16 2009 02:18:58 john blair wrote: > cat a | /build/toolchain/lin32/coreutils-8.2/bin/sort -V > kernel-2.6.18-164.2.1.el5.x86_64.rpm > kernel-2.6.18-164.6.1.el5.x86_64.rpm > kernel-2.6.18-164.el5.x86_64.rpm > > The result should be > kernel-2.6.18-164.el5.x86_64.rpm > kernel-2.6.18-164.2.1.el5.x86_64.rpm > kernel-2.6.18-164.6.1.el5.x86_64.rpm > > Is it a bug is sort -V?
I agree the behavior is pretty awkward. Nevertheless the behavior is well documented: http://www.gnu.org/software/coreutils/manual/html_node/Details-about-version-sort.html The "bug" is triggered by the underscore in "x86_64". It's not treated as file suffix in that case. However it works fairly well when you replace "x86_64" by "i686". Kamil