2015-03-17 22:59:09 +00:00
|
|
|
.Dd March 17, 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
|
2015-03-17 22:59:09 +00:00
|
|
|
.Op Fl f Ar num
|
|
|
|
.Op Fl s Ar num
|
2015-02-11 14:56:16 +00:00
|
|
|
.Op Ar input Op Ar output
|
2015-01-30 20:51:23 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-02-11 15:18:10 +00:00
|
|
|
reads the
|
|
|
|
.Ar input
|
|
|
|
file and writes one copy of a line from each group of consecutive
|
|
|
|
duplicate lines to the
|
|
|
|
.Ar output
|
|
|
|
file. If no
|
|
|
|
.Ar input
|
2015-03-17 22:59:09 +00:00
|
|
|
file is given
|
2015-02-01 19:52:28 +00:00
|
|
|
.Nm
|
2015-02-11 15:18:10 +00:00
|
|
|
reads from stdin. If no
|
|
|
|
.Ar output
|
2015-03-17 22:59:09 +00:00
|
|
|
file is given
|
2015-02-11 15:18:10 +00:00
|
|
|
.Nm
|
|
|
|
writes to stdout.
|
2015-01-30 20:51:23 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl c
|
2015-03-17 22:59:09 +00:00
|
|
|
Prefix each line with the number of consecutive occurrences in
|
|
|
|
.Ar input .
|
|
|
|
.It Fl d | Fl u
|
|
|
|
Print duplicate | unique lines only.
|
|
|
|
.It Fl f Ar num | Fl s Ar num
|
2015-02-11 12:12:21 +00:00
|
|
|
Ignore the first
|
2015-03-17 22:59:09 +00:00
|
|
|
.Ar num
|
|
|
|
fields | characters in each input line when doing comparisons.
|
2015-01-30 20:51:23 +00:00
|
|
|
.El
|
2015-02-11 15:55:58 +00:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
|
|
|
.St -p1003.1-2008
|
|
|
|
specification.
|