1UNIQ(1) User Commands UNIQ(1)
2
3
4
6 uniq - report or omit repeated lines
7
9 uniq [OPTION]... [INPUT [OUTPUT]]
10
12 Filter adjacent matching lines from INPUT (or standard input), writing
13 to OUTPUT (or standard output).
14
15 With no options, matching lines are merged to the first occurrence.
16
17 Mandatory arguments to long options are mandatory for short options
18 too.
19
20 -c, --count
21 prefix lines by the number of occurrences
22
23 -d, --repeated
24 only print duplicate lines
25
26 -D, --all-repeated[=delimit-method]
27 print all duplicate lines
28 delimit-method={none(default),prepend,separate} Delimiting is
29 done with blank lines.
30
31 -f, --skip-fields=N
32 avoid comparing the first N fields
33
34 -i, --ignore-case
35 ignore differences in case when comparing
36
37 -s, --skip-chars=N
38 avoid comparing the first N characters
39
40 -u, --unique
41 only print unique lines
42
43 -z, --zero-terminated
44 end lines with 0 byte, not newline
45
46 -w, --check-chars=N
47 compare no more than N characters in lines
48
49 --help display this help and exit
50
51 --version
52 output version information and exit
53
54 A field is a run of blanks (usually spaces and/or TABs), then non-blank
55 characters. Fields are skipped before chars.
56
57 Note: 'uniq' does not detect repeated lines unless they are adjacent.
58 You may want to sort the input first, or use `sort -u' without `uniq'.
59 Also, comparisons honor the rules specified by `LC_COLLATE'.
60
62 Written by Richard M. Stallman and David MacKenzie.
63
65 Report uniq bugs to bug-coreutils@gnu.org
66 GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
67 General help using GNU software: <http://www.gnu.org/gethelp/>
68 Report uniq translation bugs to <http://translationproject.org/team/>
69
71 Copyright © 2010 Free Software Foundation, Inc. License GPLv3+: GNU
72 GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
73 This is free software: you are free to change and redistribute it.
74 There is NO WARRANTY, to the extent permitted by law.
75
77 comm(1), join(1)
78
79 The full documentation for uniq is maintained as a Texinfo manual. If
80 the info and uniq programs are properly installed at your site, the
81 command
82
83 info coreutils 'uniq invocation'
84
85 should give you access to the complete manual.
86
87
88
89GNU coreutils 8.4 June 2018 UNIQ(1)