uniq reads the input, compares adjacent lines, and writes one copy of each input line on the output. The second
and succeeding copies of the repeated adjacent lines are not written.
If the output file, outfile, is not specified, uniq writes to standard output. If no infile is
given, or if the infile is -, uniq reads from standard input with the start of the file defined as
the current offset.
The option value may be omitted. The default value is none.
-f, --skip-fields=fields
fields is the number of fields to skip over before checking
for uniqueness. A field is the minimal string matching the BRE [[:blank:]]*[^[:blank:]]*. -number is
equivalent to --skip-fields=number.
-i, --ignore-case
Ignore case in comparisons.
-s, --skip-chars=chars
chars is the number of characters to skip over before
checking for uniqueness. If specified along with -f, the first chars after the first fields are
ignored. If the chars specifies more characters than are on the line, an empty string will be used for
comparison. +number is equivalent to --skip-chars=number.
-u, --unique
Output unique lines.
-w, --check-chars=chars
chars is the number of characters to compare after skipping
any specified fields and characters.