uniq: Uniquify files

Uniquify files, write out the unique lines from the given InputFile.
If an InputFile of `-? (or nothing) is given, then uniq will read from standard input.
Syntax
uniq [options]... [InputFile [OutputFile]]

Options

-N
-f N
--skip-fields=N
Skip N fields on each line before checking for uniqueness. Fields
are sequences of non-space non-tab characters that are separated
from each other by at least one spaces or tabs.

N
-s N
--skip-chars=N
Skip N characters before checking for uniqueness. If you use both
the field and character skipping options, fields are skipped over
first.

-c
--count
Print the number of times each line occurred along with the line.

-i
--ignore-case
Ignore differences in case when comparing lines.

-d
--repeated
Print only duplicate lines.

-D
--all-repeated
Print all duplicate lines and only duplicate lines. This option
is useful mainly in conjunction with other options e.g., to ignore
case or to compare only selected fields. This is a GNU extension.

-u
--unique
Print only unique lines.

-w N
--check-chars=N
Compare N characters on each line (after skipping any specified
fields and characters). By default the entire rest of the lines
are compared.
By default, `uniq? prints the unique lines in a sorted file, i.e.,
discards all but one of identical successive lines. Optionally, it can instead
show only lines that appear exactly once, or lines that appear more than once.


The input must be sorted. If your input is not sorted, perhaps you want to use
`sort -u?.

If no OutputFile file is specified, `uniq? writes to standard output.
"The unique the complex, the extraordinary and
irreplaceable Diana, whose beauty, both internal and external, will never
be extinguished from our minds" - Earl Spencer
Tags
Comments
Write the first comment
Leave a trace
Name *
Email *
Website
Anti SPAM * Code (3 + 1) =
Leave me a comment *
 
All comments are subject to editorial review
Post being viewed right now
Item date: 14.05.2009
Views: 566
Item date: 08.03.2009
Views: 1141
Item date: 19.07.2009
Views: 1425
Item date: 14.12.2009
Views: 825
Item date: 09.03.2009
Views: 1257
Item date: 04.02.2009
Views: 472
Item date: 16.06.2009
Views: 722
Item date: 02.12.2011
Views: 143
Item date: 22.08.2009
Views: 1491