By the way, sort -n does not sort numerically over all fields, as the
following example demonstrates:

$ (echo 10 2 3; echo 1 2 3; echo 1 3 4; echo 1 10 3) | sort -n
1 10 3
1 2 3
1 3 4
10 2 3

The fields after the initial numeric string are sorted by means of the
last-resort comparison, not numerically. If you need to sort numerically
over multiple fields, then I think you need to do something like 'sort
-n -k1,1 -k2,2 -k3,3'. The info documentation says: "For the large
majority of applications, treating keys spanning more than one field as
numeric will not do what you expect."

-- 
sort -nu removes inequivalent lines
https://bugs.launchpad.net/bugs/179131
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to