TOOL » LINUX » PACKAGE

Uniq

Usage

Report or omit repeated lines.

shell
uniq OPTION INPUT OUTPUT
OptionDescription
-i --ignore-caseIgnore differences in case when comparing.
-z --zero-terminatedline delimiter is NUL, not newline.

Example

Sort and remove repeated lines. In this case using sort -u would be better, though.

shell
sort input.txt | uniq