[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug report - uniq
From: |
Paul Eggert |
Subject: |
Re: bug report - uniq |
Date: |
Tue, 18 Dec 2007 15:10:18 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> +Note: while uniq can be useful even with unsorted input, in most
> applications\n\
> +the input is sorted in a manner consistent with field-selection options.\n\
> +E.g., use `sort' if `uniq' uses no such option (or simply use `sort -u');\n\
> +use `sort -k 3b' with uniq -f2.\n\
That's not quite right, is it? With -k 3b, 'sort' ignores leading
blanks in the 3rd field; but with -f2, 'uniq' treats those blanks as
significant.
Also, the details about field selection get in the way of the basic idea.
How about the following wording instead?
Note: 'uniq' does not detect repeated lines unless they are adjacent.
You may want to sort the input first, or use `sort -u' without `uniq'.