Commit | Line | Data |
---|---|---|
e6817382 BJ |
1 | .TH UNIQ 1 |
2 | .SH NAME | |
3 | uniq \- report repeated lines in a file | |
4 | .SH SYNOPSIS | |
5 | .B uniq | |
6 | [ | |
7 | .B \-udc | |
8 | [ | |
9 | .BR + n | |
10 | ] [ | |
11 | .BR \- n | |
12 | ] | |
13 | ] [ input [ output ] ] | |
14 | .SH DESCRIPTION | |
15 | .I Uniq | |
16 | reads the input | |
17 | file comparing adjacent lines. | |
18 | In the normal case, the second and succeeding copies | |
19 | of repeated lines are | |
20 | removed; the remainder is written on the output file. | |
21 | Note that repeated lines must be adjacent | |
22 | in order to be found; | |
23 | see | |
24 | .IR sort (1). | |
25 | If the | |
26 | .B \-u | |
27 | flag is used, | |
28 | just the lines that are not repeated | |
29 | in the original file are output. | |
30 | The | |
31 | .B \-d | |
32 | option specifies that | |
33 | one copy of just the repeated lines is to | |
34 | be written. | |
35 | The normal mode output is the union of the | |
36 | .B \-u | |
37 | and | |
38 | .B \-d | |
39 | mode outputs. | |
40 | .PP | |
41 | The | |
42 | .B \-c | |
43 | option supersedes | |
44 | .B \-u | |
45 | and | |
46 | .B \-d | |
47 | and generates | |
48 | an output report in default style | |
49 | but with each line preceded by a count of the | |
50 | number of times it occurred. | |
51 | .PP | |
52 | The | |
53 | .I n | |
54 | arguments specify skipping an initial portion of each line | |
55 | in the comparison: | |
56 | .TP 8 | |
57 | .BI \- n | |
58 | The first | |
59 | .IR n | |
60 | fields | |
61 | together with any blanks before each are ignored. | |
62 | A field is defined as a string of non-space, non-tab characters | |
63 | separated by tabs and spaces from its neighbors. | |
64 | .TP 8 | |
65 | .BI + n | |
66 | The first | |
67 | .IR n | |
68 | characters are ignored. | |
69 | Fields are skipped before characters. | |
70 | .PP | |
71 | .SH "SEE ALSO" | |
72 | sort(1), comm(1) |