sbase/uniq.1
sin 5f06185b1b uniq: Fixup program usage and manpage
Remove -i as it is not required by POSIX.  We'll add it if we
hit scripts that require it.
2015-02-11 12:19:38 +00:00

41 lines
834 B
Groff

.Dd January 30, 2015
.Dt UNIQ 1
.Os sbase
.Sh NAME
.Nm uniq
.Nd report or filter out repeated lines in a file
.Sh SYNOPSIS
.Nm
.Op Fl c
.Op Fl d | u
.Op Fl f Ar fields
.Op Fl s Ar chars
.Op Ar file
.Sh DESCRIPTION
.Nm
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.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl c
Prefixes each line with a count of its consecutive occurrences in the input.
.It Fl d
Suppresses non-duplicate lines (thus 'uniq -d' prints only duplicates).
.It Fl u
Suppresses non-unique lines (thus 'uniq -u' prints only uniques).
.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.
.El