On Mon, May 4, 2009 at 01:58, Steve Ward <plane...@gmail.com> wrote:

> For the uniq program, these options exist:
>
> --skip-chars=N
>     avoid comparing the first N characters
>
> --skip-fields=N
>     avoid comparing the first N fields
>
> --check-chars=N
>     compare no more than N characters in lines
>
>
> It would be nice to have:
>
> --check-fields=N
>     compare no more than N fields in lines
>
>
>
> Steve
>



Here is my use case.  I have a sorted file with lines like this:

<unsigned int><tab><string>

I want uniq to print only duplicate lines by comparing the first field, not
the rest of the line.
The integer is not padded, so the first field is never the same number of
characters.  (Otherwise I'd use the check-chars option.)  The string field
needs to remain intact.


Steve
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to