bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug report - uniq


From: Jim Meyering
Subject: Re: bug report - uniq
Date: Tue, 18 Dec 2007 11:21:39 +0100

Paul Eggert <address@hidden> wrote:
> Eric Blake <address@hidden> writes:
>> As an aside, I'm wondering if the --help output for uniq should be a bit
>> more explicit about this property; contrast it with the output for join,
>
> Unlike 'join', the input to 'uniq' need not be sorted, so it's not
> immediately clear how to reword its --help output.

This should cover it:

diff --git a/src/uniq.c b/src/uniq.c
index 2864522..c88fb3d 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -168,6 +168,13 @@ Mandatory arguments to long options are mandatory for 
short options too.\n\
 A field is a run of whitespace, then non-whitespace characters.\n\
 Fields are skipped before chars.\n\
 "), stdout);
+     fputs (_("\
+\n\
+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\
+"), stdout);
       emit_bug_reporting_address ();
     }
   exit (status);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]