UNIQ (I)                     12/1/72                     UNIQ (I)

NAME            uniq -- report repeated lines in a file

SYNOPSIS        uniq [ -ud ]  [ input [ output ] ]

DESCRIPTION     uniq reads the input file comparing adjacent

                lines.  In the normal case, the second and suc-

                ceeding 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 orig-

                inal 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.

                The following example will print one copy of all

                lines in the file a that do not occur in b:

                        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

FILES           --

SEE ALSO        sort(I)

DIAGNOSTICS     "cannot open input", "cannot create output"

BUGS            --