URL: <http://savannah.gnu.org/bugs/?20883>
Summary: sort -u -n drops more lines than expected Project: GNU Core Utilities Submitted by: None Submitted on: Friday 08/24/2007 at 05:52 UTC Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: Given the following example input: 1 3 2 1 1 1 3 1 1 2 1 1 sort -u gives the expected output: 1 1 1 2 1 3 2 1 3 1 But sort -n -u drops all lines that match the sort column: 1 3 2 1 3 1 Or compare sort -n -u -k2: 2 1 1 2 1 3 It's not clear from the info page that this is the correct behavior, but I would expect sort -n -u to do the same as sort -n | uniq, or for this omitting equal keys (instead of equal lines) to be more explicit in the documentation. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?20883> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils