UNIQ(1)

NAME
uniq - report or filter out repeated lines in a file

SYNOPSIS
uniq [-c] [-d | -u] [-f num] [-s num] [input [output]]

DESCRIPTION
uniq reads the input file and writes one copy of a line from each group of consecutive duplicate lines to the output file. If no input file is given uniq reads from stdin. If no output file is given uniq writes to stdout.

OPTIONS

-c  Prefix each line with the number of consecutive occurrences in input.

-d | -u
    Print duplicate | unique lines only.

-f num | -s num
    Ignore the first num fields | characters in each input line when doing comparisons.

STANDARDS
POSIX.1-2013.