Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uniq(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

comm

sort

uniq

PURPOSE

     Deletes repeated lines in a file.

SYNOPSIS
     uniq [ -udc [ +n ] [ -n ] ] [ input [ output ] ]


DESCRIPTION

     The uniq command reads standard input or infile, compares
     adjacent lines, removes the  second and succeeding occur-
     rences of  a line, and  writes to standard output  or the
     specified file outfile.  infile and outfile should always
     be different  files.  Repeated  lines must be  on consec-
     utive lines in  order to be found.  You  can arrange them
     with the sort command (see page 869) before processing.

FLAGS

     -c     Precedes  each output  line  with a  count of  the
            number  of times  each line  appears in  the file.
            This flag supersedes -d and -u.
     -d     Displays only the repeated lines.
     -u     Displays only the unrepeated lines.
     -num   Skips over  the first  num fields.   A field  is a
            string of nonspace, nontab characters separated by
            tabs and or spaces from  adjacent data on the same
            line.
     +num   Skips over the first num characters.  Fields spec-
            ified by num are skipped before characters.

RELATED INFORMATION

     The following commands:  "comm" and "sort."

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026