blob: 64a302e873f3663e52aa369bbd6a8a4ce1d1de3a [file] [log] [blame]
rsccfa37a72004-04-10 18:53:55 +00001.TH UNIQ 1
2.SH NAME
3uniq \- report repeated lines in a file
4.SH SYNOPSIS
5.B uniq
6[
7.B -udc
8[
9.BI +- num
10]
11]
12[
13.I file
14]
15.SH DESCRIPTION
16.I Uniq
17copies the input
18.IR file ,
19or the standard input, to the
20standard output, comparing adjacent lines.
21In the normal case, the second and succeeding copies
22of repeated lines are
23removed.
24Repeated lines must be adjacent
25in order to be found.
26.TP
27.B -u
28Print unique lines.
29.TP
30.B -d
31Print (one copy of) duplicated lines.
32.TP
33.B -c
34Prefix a repetition count and a tab to each output line.
35Implies
36.B -u
37and
38.BR -d .
39.TP
40.BI - num
41The first
42.IR num
43fields
44together with any blanks before each are ignored.
45A field is defined as a string of non-space, non-tab characters
46separated by tabs and spaces from its neighbors.
47.TP
48.BI + num
49The first
50.IR num
51characters are ignored.
52Fields are skipped before characters.
53.SH SOURCE
rscb5fdffe2004-04-19 19:22:56 +000054.B /usr/local/plan9/src/cmd/uniq.c
rsccfa37a72004-04-10 18:53:55 +000055.SH "SEE ALSO"
56.IR sort (1)
57.SH BUGS
58Field selection and comparison should be compatible with
59.IR sort (1).