uniq.1 (1210B)
- .\" utils-std: Collection of commonly available Unix tools
- .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- .\" SPDX-License-Identifier: MPL-2.0
- .Dd 2024-05-02
- .Dt UNIQ 1
- .Os
- .Sh NAME
- .Nm uniq
- .Nd report or filter out duplicated lines
- .Sh SYNOPSIS
- .Nm
- .Op Fl c Ns | Ns Fl d Ns | Ns Fl u
- .Op Fl f Ar field_shift
- .Op Fl s Ar byte_shift
- .Op Ar input_file Op Ar output_file
- .Sh DESCRIPTION
- The
- .Nm
- utility reads
- .Ar file1
- and
- .Ar file2
- line-by-line and by default filters out repeating lines.
- .Sh OPTIONS
- The following options are supported:
- .Bl -tag -width Ds
- .It Fl c
- Prefix lines with how many times they are duplicated.
- .It Fl d
- Only write duplicated lines (count > 1).
- .It Fl f Ar field_shift
- Shift the compared line by
- .Ar field_shift
- amount of fields, where a field is
- .Aq blank
- separated.
- .It Fl s Ar byte_shift
- Shift the compared lines by
- .Ar byte_shift .
- If
- .Ar field_shift
- was also specified, it provides an additional shift.
- .It Fl u
- Only write unique lines (count == 1).
- .El
- .Sh EXIT STATUS
- .Ex -std
- .Sh STANDARDS
- .Nm
- should be compliant with the
- IEEE Std 1003.1-2024 (“POSIX.1”)
- specification.
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me