aboutsummaryrefslogtreecommitdiff
path: root/man/man1/uniq.1
blob: 07629ea4e3126daf52289c0198dbbff22fbd740e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.TH UNIQ 1
.SH NAME
uniq \- report repeated lines in a file
.SH SYNOPSIS
.B uniq
[
.B -udc
[
.BI +- num
]
]
[
.I file
]
.SH DESCRIPTION
.I Uniq
copies the input
.IR file ,
or the standard input, to the
standard output, comparing adjacent lines.
In the normal case, the second and succeeding copies
of repeated lines are
removed.
Repeated lines must be adjacent
in order to be found.
.TP
.B -u
Print unique lines.
.TP
.B -d
Print (one copy of) duplicated lines.
.TP
.B -c
Prefix a repetition count and a tab to each output line.
Implies
.B -u
and
.BR -d .
.TP
.BI - num
The first
.IR num
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
.BI + num
The first
.IR num
characters are ignored.
Fields are skipped before characters.
.SH SOURCE
.B \*9/src/cmd/uniq.c
.SH "SEE ALSO"
.IR sort (1) 
.SH BUGS
Field selection and comparison should be compatible with 
.MR sort (1) .