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