2015-03-27 12:22:48 -04:00
|
|
|
.Dd March 27, 2015
|
2015-01-31 08:20:02 -05:00
|
|
|
.Dt UNIQ 1
|
2015-01-31 14:37:03 -05:00
|
|
|
.Os sbase
|
2015-01-30 15:51:23 -05:00
|
|
|
.Sh NAME
|
|
|
|
.Nm uniq
|
|
|
|
.Nd report or filter out repeated lines in a file
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2015-02-11 07:12:21 -05:00
|
|
|
.Op Fl c
|
|
|
|
.Op Fl d | u
|
2015-03-17 18:59:09 -04:00
|
|
|
.Op Fl f Ar num
|
|
|
|
.Op Fl s Ar num
|
2015-02-11 09:56:16 -05:00
|
|
|
.Op Ar input Op Ar output
|
2015-01-30 15:51:23 -05:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-02-11 10:18:10 -05: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 18:59:09 -04:00
|
|
|
file is given
|
2015-02-01 14:52:28 -05:00
|
|
|
.Nm
|
2015-02-11 10:18:10 -05:00
|
|
|
reads from stdin. If no
|
|
|
|
.Ar output
|
2015-03-17 18:59:09 -04:00
|
|
|
file is given
|
2015-02-11 10:18:10 -05:00
|
|
|
.Nm
|
|
|
|
writes to stdout.
|
2015-01-30 15:51:23 -05:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl c
|
2015-03-17 18:59:09 -04: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 07:12:21 -05:00
|
|
|
Ignore the first
|
2015-03-17 18:59:09 -04:00
|
|
|
.Ar num
|
|
|
|
fields | characters in each input line when doing comparisons.
|
2015-01-30 15:51:23 -05:00
|
|
|
.El
|
2015-02-11 10:55:58 -05:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
2015-03-27 12:22:48 -04:00
|
|
|
.St -p1003.1-2013
|
2015-02-11 10:55:58 -05:00
|
|
|
specification.
|