bug-coreutils
[Top][All Lists]
Advanced

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

Re: uniq/sort documentation flaw


From: Jim Meyering
Subject: Re: uniq/sort documentation flaw
Date: Tue, 05 May 2009 16:34:28 +0200

Pádraig Brady wrote:

> Andries E. Brouwer wrote:
>> uniq(1) says
>>
>>        Discard all but one of successive identical lines from INPUT
>>
>> However, this is very misleading. "Identical" does not mean identical
>> but "equal if one ignores differences that LC_COLLATE says should be 
>> ignored".
>>
>> This man page line should be changed, adding a reference to the locale.
>> As it is now, the words locale and LC_COLLATE do not occur on the man page.
>>
>> The info file is better and mentions LC_COLLATE.
>> But also there the fact that the meanings of "repeated" and "duplicate"
>> are modified by LC_COLLATE is not mentioned explicitly.
>>
>> Andries
>
> How about the attached?

Thanks.
One suggestion:

>>From 14d5f083fc6ed571ca0c07e51e7d4365c1ddcd91 Mon Sep 17 00:00:00 2001
> From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden>
> Date: Tue, 5 May 2009 12:00:15 +0100
> Subject: [PATCH] doc: note the use of LC_COLLATE in comm, join and uniq.
...
> diff --git a/src/uniq.c b/src/uniq.c
> index a3e0fb7..f9b4342 100644
> --- a/src/uniq.c
> +++ b/src/uniq.c
> @@ -135,8 +135,10 @@ Usage: %s [OPTION]... [INPUT [OUTPUT]]\n\
>  "),
>             program_name);
>        fputs (_("\
> -Discard all but one of successive identical lines from INPUT (or\n\
> -standard input), writing to OUTPUT (or standard output).\n\
> +Filter adjacent matching lines from INPUT (or standard input),\n\
> +writing to OUTPUT (or standard output).\n\

That can be read as removing all lines that match.
I'd like it to say clearly that one of the lines remains.
How about this?

  Discard all but one of a sequence of matching lines from INPUT (or\n\
  standard input), writing to OUTPUT (or standard output).\n\




reply via email to

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