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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
.\" Adapted for BNU from the GNU Coreutils 9.11 manual page; see doc/README.md.
.TH UNIQ "1" "2026-07-28" "BNU 9.11" "BNU Commands"
.SH NAME
uniq \- report or omit repeated lines
.SH SYNOPSIS
.B uniq
[\fI\,OPTION\/\fR]... [\fI\,INPUT \/\fR[\fI\,OUTPUT\/\fR]]
.SH DESCRIPTION
.\" This page is derived from GNU Coreutils documentation.
This page documents BNU, an independent Bun implementation compatible with
GNU Coreutils 9.11.
.PP
Filter adjacent matching lines from INPUT (or standard input),
writing to OUTPUT (or standard output).
.PP
With no options, matching lines are merged to the first occurrence.
.PP
Mandatory arguments to long options are mandatory for short options too.
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-c'\fB\-c, \-\-count\fP\X'tty: link'
prefix lines by the number of occurrences
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-d'\fB\-d, \-\-repeated\fP\X'tty: link'
only print duplicate lines, one for each group
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-D'\fB\-D\fP\X'tty: link'
print all duplicate lines
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq--all-repeated'\fB\-\-all\-repeated[=METHOD]\fP\X'tty: link'
like \fB\-D\fR, but allow separating groups with an empty line;
METHOD={none(default),prepend,separate}
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-f'\fB\-f, \-\-skip\-fields=\,N\fP\X'tty: link'\/\fR
avoid comparing the first N fields
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq--group'\fB\-\-group[=METHOD]\fP\X'tty: link'
show all items, separating groups with an empty line;
METHOD={separate(default),prepend,append,both}
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-i'\fB\-i, \-\-ignore\-case\fP\X'tty: link'
ignore differences in case when comparing
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-s'\fB\-s, \-\-skip\-chars=\,N\fP\X'tty: link'\/\fR
avoid comparing the first N characters
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-u'\fB\-u, \-\-unique\fP\X'tty: link'
only print unique lines
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-z'\fB\-z, \-\-zero\-terminated\fP\X'tty: link'
line delimiter is NUL, not newline
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-w'\fB\-w, \-\-check\-chars=\,N\fP\X'tty: link'\/\fR
compare no more than N characters in lines
.TP
\X'tty: link https://www.gnu.org/software/coreutils/uniq#uniq--help'\fB\-\-help\fP\X'tty: link'
display this help and exit
.TP
\X'tty: link https://www.gnu.org/software/coreutils/uniq#uniq--version'\fB\-\-version\fP\X'tty: link'
output version information and exit
.PP
A field is a run of blanks (usually spaces and/or TABs), then non\-blank
characters. Fields are skipped before chars.
.PP
\&'uniq' does not detect repeated lines unless they are adjacent.
You may want to sort the input first, or use 'sort \fB\-u\fR' without 'uniq'.
.SH AUTHORS
Upstream GNU Coreutils documentation authors:
Written by Richard M. Stallman and David MacKenzie.
.br
Adapted for BNU; the BNU implementation is independent.
.SH "REPORTING BUGS"
Report BNU bugs at <https://github.com/Soccera1/bnu/issues>.
.br
For upstream GNU Coreutils, see <https://www.gnu.org/software/coreutils/>.
.SH COPYRIGHT
Copyright \(co 2026 Free Software Foundation, Inc.
.br
This manual page was adapted for BNU in 2026.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
\fBcomm\fP(1), \fBjoin\fP(1), \fBsort\fP(1)
.PP
.br
Upstream documentation <https://www.gnu.org/software/coreutils/uniq>
.br
BNU documentation is available locally via: info \(aq(bnu) uniq invocation\(aq
|