|Skip Navigation Links| |Exit Print View| |man pages section 1:
User Commands Oracle Solaris 10 8/11 Information Library| -
report or filter out repeated lines in a file uniq [-c | -d |
-u] [-f fields] [-s char] [input_file [output_file]] uniq [-c |
-d | -u] [-n] [+ m] [input_file [output_file]] The uniq utility
will read an input file comparing adjacent lines, and write one
copy of each input line on the output. The second and succeeding
copies of repeated adjacent input lines will not be written.
Repeated lines in the input will not be detected if they are not
adjacent. The following options are supported: Precedes each
output line with a count of the number of times the line
occurred in the input. Suppresses the writing of lines that are
not repeated in the input. Ignores the first fields fields on
each input line when doing comparisons, where fields is a
positive decimal integer. A field is the maximal string matched
by the basic regular expression: If fields specifies more fields
than appear on an input