'\"macro stdmacro
.if n .pH g1.uniq @(#)uniq	40.3 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} uniq 1 "Directory and File Management Utilities" "\&"
.if \nX=1 .ds x} uniq 1 "Directory and File Management Utilities"
.if \nX=2 .ds x} uniq 1 "" "\&"
.if \nX=3 .ds x} uniq "" "" "\&"
.TH \*(x}
.SH NAME
\f4uniq\f1 \- report repeated lines in a file
.SH SYNOPSIS
\f4uniq\f1
[
\f4\-udc\f1
[
\f4+\f1n
] [
\f4\-\f1n
]
] [ \f2input\f1 [ \f2output\f1 ] ]
.SH DESCRIPTION
\f4uniq\fP
reads the input
file comparing adjacent lines.
In the normal case, the second and succeeding copies
of repeated lines are
removed; the remainder is written on the output file.
.IR Input " and " output
should always be different.
Note that repeated lines must be adjacent
in order to be found;
see
\f4sort\f1(1).
If the
\f4\-u\f1
flag is used,
just the lines that are not repeated
in the original file are output.
The
\f4\-d\f1
option specifies that
one copy of just the repeated lines is to
be written.
The normal mode output is the union of the
\f4\-u\f1
and
\f4\-d\f1
mode outputs.
.PP
The
\f4\-c\f1
option supersedes
\f4\-u\f1
and
\f4\-d\f1
and generates
an output report in default style
but with each line preceded by a count of the
number of times it occurred.
.PP
The
.I n\^
arguments specify skipping an initial portion of each line
in the comparison:
.TP 8
\f4\-\f2n\^\f1
The first
.IR n 
fields
together with any blanks before each are ignored.
A field is defined as a string of non-space, non-tab characters
separated by tabs and spaces from its neighbors.
.TP 8
\f4+\f2n\^\f1
The first
.IR n 
characters are ignored.
Fields are skipped before characters.
.PP
.SH "SEE ALSO"
\f4comm\fP(1), \f4sort\fP(1).
.\"	@(#)uniq.1	6.2 of 9/2/83
.Ee
