UNIQ(1) UNIX Programmer's Manual UNIQ(1)
uniq - report repeated lines in a file
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
u
\bun
\bni
\biq
\bq [ -
\b-u
\bud
\bdc
\bc [ +
\b+n ] [ -
\b-n ] ] [ input [ output ] ]
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
_
\bU_
\bn_
\bi_
\bq 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. Note that repeated lines must be adjacent in order to
be found; see _
\bs_
\bo_
\br_
\bt(1). If the -
\b-u
\bu flag is used, just the
lines that are not repeated in the original file are output.
The -
\b-d
\bd option specifies that one copy of just the repeated
lines is to be written. The normal mode output is the union
of the -
\b-u
\bu and -
\b-d
\bd mode outputs.
The -
\b-c
\bc option supersedes -
\b-u
\bu and -
\b-d
\bd and generates an output
report in default style but with each line preceded by a
count of the number of times it occurred.
The _
\bn arguments specify skipping an initial portion of each
-
\b-_
\bn The first _
\bn 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.
+
\b+_
\bn The first _
\bn characters are ignored. Fields are
skipped before characters.
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
Printed 7/9/88 April 29, 1985 1