.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5.
.TH UNIQ "1" "April 2024" "GNU coreutils 9.5" "User Commands"
.SH NAME
uniq \- report or omit repeated lines
.SH SYNOPSIS
.B uniq
[\fI\,OPTION\/\fR]... [\fI\,INPUT \/\fR[\fI\,OUTPUT\/\fR]]
.SH DESCRIPTION
.\" Add any additional description here
.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
\fB\-c\fR, \fB\-\-count\fR
prefix lines by the number of occurrences
.TP
\fB\-d\fR, \fB\-\-repeated\fR
only print duplicate lines, one for each group
.TP
\fB\-D\fR
print all duplicate lines
.TP
\fB\-\-all\-repeated\fR[=\fI\,METHOD\/\fR]
like \fB\-D\fR, but allow separating groups
with an empty line;
METHOD={none(default),prepend,separate}
.TP
\fB\-f\fR, \fB\-\-skip\-fields\fR=\fI\,N\/\fR
avoid comparing the first N fields
.TP
\fB\-\-group\fR[=\fI\,METHOD\/\fR]
show all items, separating groups with an empty line;
METHOD={separate(default),prepend,append,both}
.TP
\fB\-i\fR, \fB\-\-ignore\-case\fR
ignore differences in case when comparing
.TP
\fB\-s\fR, \fB\-\-skip\-chars\fR=\fI\,N\/\fR
avoid comparing the first N characters
.TP
\fB\-u\fR, \fB\-\-unique\fR
only print unique lines
.TP
\fB\-z\fR, \fB\-\-zero\-terminated\fR
line delimiter is NUL, not newline
.TP
\fB\-w\fR, \fB\-\-check\-chars\fR=\fI\,N\/\fR
compare no more than N characters in lines
.TP
\fB\-\-help\fR
display this help and exit
.TP
\fB\-\-version\fR
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 AUTHOR
Written by Richard M. Stallman and David MacKenzie.
.SH "REPORTING BUGS"
GNU coreutils online help:
.br
Report any translation bugs to
.SH COPYRIGHT
Copyright \(co 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
.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
Full documentation
.br
or available locally via: info \(aq(coreutils) uniq invocation\(aq