|
|
coherent
uniq Command uniq
Remove/count repeated lines in a sorted file
uunniiqq [-ccdduu] [-_n] [+_n] [_i_n_f_i_l_e[_o_u_t_f_i_l_e]]
uniq reads input line by line from infile and writes all non-
duplicated lines to outfile. The input file must be sorted.
uniq uses the standard input or output if either infile or out-
file is omitted. The following describes the available options:
-cc Print each line once, discarding duplicate lines; before
each line, print the number of times it appears within the
file.
-dd Print only lines that are duplicated within the file; print
each line only once; do not print any counts.
-uu Print only lines that are _n_o_t duplicated within the file.
uniq by default behaves as if both -uu and -dd were specified, so
it prints each unique line once.
Optional specifiers allow uniq to skip leading portions of the
input lines when comparing for uniqueness.
-_n Skip n fields of each input line, where a field is any num-
ber of non-white space characters surrounded by any number
of white space characters (blank or tab).
+_n Skip n characters in each input line, after skipping fields
as above.
***** See Also *****
comm, commands, sort
COHERENT Lexicon Page 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.