| 1 |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1. |
| 2 |
.TH UNIQ "1" "June 2025" "GNU coreutils 9.7" "User Commands" |
| 3 |
.SH NAME |
| 4 |
uniq \- report or omit repeated lines |
| 5 |
.SH SYNOPSIS |
| 6 |
.B uniq |
| 7 |
[\fI\,OPTION\/\fR]... [\fI\,INPUT \/\fR[\fI\,OUTPUT\/\fR]] |
| 8 |
.SH DESCRIPTION |
| 9 |
.\" Add any additional description here |
| 10 |
.PP |
| 11 |
Filter adjacent matching lines from INPUT (or standard input), |
| 12 |
writing to OUTPUT (or standard output). |
| 13 |
.PP |
| 14 |
With no options, matching lines are merged to the first occurrence. |
| 15 |
.PP |
| 16 |
Mandatory arguments to long options are mandatory for short options too. |
| 17 |
.TP |
| 18 |
\fB\-c\fR, \fB\-\-count\fR |
| 19 |
prefix lines by the number of occurrences |
| 20 |
.TP |
| 21 |
\fB\-d\fR, \fB\-\-repeated\fR |
| 22 |
only print duplicate lines, one for each group |
| 23 |
.TP |
| 24 |
\fB\-D\fR |
| 25 |
print all duplicate lines |
| 26 |
.TP |
| 27 |
\fB\-\-all\-repeated\fR[=\fI\,METHOD\/\fR] |
| 28 |
like \fB\-D\fR, but allow separating groups |
| 29 |
with an empty line; |
| 30 |
METHOD={none(default),prepend,separate} |
| 31 |
.TP |
| 32 |
\fB\-f\fR, \fB\-\-skip\-fields\fR=\fI\,N\/\fR |
| 33 |
avoid comparing the first N fields |
| 34 |
.TP |
| 35 |
\fB\-\-group\fR[=\fI\,METHOD\/\fR] |
| 36 |
show all items, separating groups with an empty line; |
| 37 |
METHOD={separate(default),prepend,append,both} |
| 38 |
.TP |
| 39 |
\fB\-i\fR, \fB\-\-ignore\-case\fR |
| 40 |
ignore differences in case when comparing |
| 41 |
.TP |
| 42 |
\fB\-s\fR, \fB\-\-skip\-chars\fR=\fI\,N\/\fR |
| 43 |
avoid comparing the first N characters |
| 44 |
.TP |
| 45 |
\fB\-u\fR, \fB\-\-unique\fR |
| 46 |
only print unique lines |
| 47 |
.TP |
| 48 |
\fB\-z\fR, \fB\-\-zero\-terminated\fR |
| 49 |
line delimiter is NUL, not newline |
| 50 |
.TP |
| 51 |
\fB\-w\fR, \fB\-\-check\-chars\fR=\fI\,N\/\fR |
| 52 |
compare no more than N characters in lines |
| 53 |
.TP |
| 54 |
\fB\-\-help\fR |
| 55 |
display this help and exit |
| 56 |
.TP |
| 57 |
\fB\-\-version\fR |
| 58 |
output version information and exit |
| 59 |
.PP |
| 60 |
A field is a run of blanks (usually spaces and/or TABs), then non\-blank |
| 61 |
characters. Fields are skipped before chars. |
| 62 |
.PP |
| 63 |
\&'uniq' does not detect repeated lines unless they are adjacent. |
| 64 |
You may want to sort the input first, or use 'sort \fB\-u\fR' without 'uniq'. |
| 65 |
.SH AUTHOR |
| 66 |
Written by Richard M. Stallman and David MacKenzie. |
| 67 |
.SH "REPORTING BUGS" |
| 68 |
GNU coreutils online help: <https://www.gnu.org/software/coreutils/> |
| 69 |
.br |
| 70 |
Report any translation bugs to <https://translationproject.org/team/> |
| 71 |
.SH "SEE ALSO" |
| 72 |
\fBcomm\fP(1), \fBjoin\fP(1), \fBsort\fP(1) |
| 73 |
.PP |
| 74 |
.br |
| 75 |
Full documentation <https://www.gnu.org/software/coreutils/uniq> |
| 76 |
.br |
| 77 |
or available locally via: info \(aq(coreutils) uniq invocation\(aq |
| 78 |
.PP |
| 79 |
.br |
| 80 |
Packaged by Debian (9.7\-3) |
| 81 |
.br |
| 82 |
Copyright \(co 2025 Free Software Foundation, Inc. |
| 83 |
.br |
| 84 |
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. |
| 85 |
.br |
| 86 |
This is free software: you are free to change and redistribute it. |
| 87 |
.br |
| 88 |
There is NO WARRANTY, to the extent permitted by law. |