Co robi UNIQ użycie. Konsola line to file2 (or to standard output). Often used as a filter. Specify.

Czy przydatne?

Polecenie uniq

Wykonanie, użycie: Remove duplicate adjacent lines from sorted file1 or from standard input, sending one copy of each line to file2 (or to standard output). Often used as a filter. Specify only one of -d or -u. See also comm and sort

Opcje wykonania uniq w konsoli

-c, --count

Print each line once, prefixing number of instances.

-d, --repeated

Print duplicate lines once but no unique lines.

-D, --all-repeated[=method]

Print all duplicate lines. -D takes no delimiter method. The delimiter method method takes one of the following values: none (default), prepend, or separate. Blank lines are used as the delimiter.

-f n, --skip-fields=n

Ignore first n fields of a line. Fields are separated by spaces or by tabs.

-i, --ignore-case

Ignore case differences when checking for duplicates.

-s n, --skip-chars=n

Ignore first n characters of a field.

-u, --unique

Print only unique lines (no copy of duplicate entries is kept).

-w n, --check-chars=n

Compare only first n characters per line (beginning after skipped fields and characters).

--help

Print a help message and then exit.

--version

Print version information and then exit.

Przykłady uniq działanie w Słownik polecenie U