August 1999
Intermediate to advanced
1000 pages
83h 9m
English
/usr/bin/uniq [-c|-d|-u][-ffields][-schars][input-file [output-file]] /usr/bin/uniq [-c|-d|-u][-n][+m][input-file [output-file]]
The uniq command produces a list of the unique lines in a file by filtering or removing repeated lines. It is usually used with files that have first been sorted with the sort(1) command.
uniq reads an input file, compares adjacent lines, and writes one copy of each input line on the output. The second and succeeding copies of repeated adjacent input lines are not written.
Repeated lines in the input are not detected if they are not adjacent.
| -c | Precede each output line with a count of the number of times the line occurred in the ... |
Read now
Unlock full access