Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

uniq(1)

comm(1)

sort(1)



  uniq(1)                             CLIX                             uniq(1)



  NAME

    uniq - Reports repeated lines in a file

  SYNOPSIS

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

  FLAGS

    -u   Outputs only those lines not repeated in the original file.

    -d   Writes one copy of the repeated lines only.

    -c   Supersedes the -u and -d flags and generates an output report in
         default style but with each line preceded by a count of the number of
         times it occurred.

    -n   Ignores the first n fields and any blanks before each.  A field is
         defined as a string of nonspace, nontab characters separated from its
         neighbors by tabs and spaces.

    +n   Ignores the first n characters.  Fields are skipped before
         characters.

  DESCRIPTION

    The uniq command reads the input file and compares adjacent lines.  In the
    normal case, the second and succeeding copies of repeated lines are
    removed; the original line is written on the output file.  The input and
    output files should always be different.  Note that repeated lines must be
    adjacent in order to be found (see sort).

    The normal output mode is the union of the -u and -d flags.  The n
    arguments cause uniq to skip an initial portion of each line in the
    comparison (see FLAGS).

  EXAMPLES

           To display an alphabetically sorted list of items from infile to
           stdout:

           sort infile | uniq


  EXIT VALUES

    The uniq command returns 0 on success; otherwise it returns 1.

  RELATED INFORMATION




  2/94 - Intergraph Corporation                                              1






  uniq(1)                             CLIX                             uniq(1)



    Commands: comm(1), sort(1)





















































  2                                              Intergraph Corporation - 2/94




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