2015-01-30 20:51:23 +00:00
|
|
|
.Dd January 30, 2015
|
2015-01-31 13:20:02 +00:00
|
|
|
.Dt UNIQ 1
|
2015-01-31 19:37:03 +00:00
|
|
|
.Os sbase
|
2015-01-30 20:51:23 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm uniq
|
|
|
|
.Nd report or filter out repeated lines in a file
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2015-02-11 12:12:21 +00:00
|
|
|
.Op Fl c
|
|
|
|
.Op Fl d | u
|
|
|
|
.Op Fl f Ar fields
|
|
|
|
.Op Fl s Ar chars
|
2015-01-30 20:51:23 +00:00
|
|
|
.Op Ar file
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-02-01 19:52:28 +00:00
|
|
|
reads
|
|
|
|
.Ar file
|
|
|
|
and writes one copy of a line from each group of consecutive
|
|
|
|
duplicate lines to stdout. If no
|
|
|
|
.Ar file
|
|
|
|
is given,
|
|
|
|
.Nm
|
|
|
|
reads from stdin.
|
2015-01-30 20:51:23 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl c
|
2015-02-01 19:52:28 +00:00
|
|
|
Prefixes each line with a count of its consecutive occurrences in the input.
|
2015-01-30 20:51:23 +00:00
|
|
|
.It Fl d
|
2015-02-01 19:52:28 +00:00
|
|
|
Suppresses non-duplicate lines (thus 'uniq -d' prints only duplicates).
|
2015-01-30 20:51:23 +00:00
|
|
|
.It Fl u
|
2015-02-01 19:52:28 +00:00
|
|
|
Suppresses non-unique lines (thus 'uniq -u' prints only uniques).
|
2015-02-11 12:12:21 +00:00
|
|
|
.It Fl f Ar fields
|
|
|
|
Ignore the first
|
|
|
|
.Ar fields
|
|
|
|
in each input line when doing comparisons.
|
|
|
|
.It Fl s Ar chars
|
|
|
|
Ignore the first
|
|
|
|
.Ar chars
|
|
|
|
characters in each input line when doing comparisons.
|
2015-01-30 20:51:23 +00:00
|
|
|
.El
|