.pa 1 .he 'UNIQ (I)'12/1/72'UNIQ (I)' .ti 0 NAME uniq -- report repeated lines in a file .sp .ti 0 SYNOPSIS uniq____ [ -ud___ ] [ input [ output ] ] .sp .ti 0 DESCRIPTION uniq____ reads the input file comparing adjacent lines. In the normal case, the second and succeeding copies of repeated lines are removed; the remainder is written on the output file. Note that repeated lines must be adjacent in order to be found. (See sort(I)) If the -u__ flag is used, just the lines that are not repeated in the original file are output. The -d__ option specifies that one copy of just the repeated lines is to be written. Note that the normal mode output is the union of the -u__ and -d__ mode outputs. .sp The following example will print one copy of all lines in the file a_ that do not occur in b_: .sp sort a x uniq x a1 sort b x uniq x b1 cat a1 b1 >x sort x uniq -u x >>a1 sort a1 uniq -d a1 .sp .ti 0 FILES -- .sp .ti 0 SEE ALSO sort(I) .sp .ti 0 DIAGNOSTICS "cannot open input", "cannot create output" .sp .ti 0 BUGS --