home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 224_01 / uniq.hlp < prev    next >
Text File  |  1987-01-07  |  1KB  |  36 lines

  1. NAME
  2.      uniq - report repeated lines in a file
  3.  
  4. SYNTAX
  5.      uniq [-udc] [+ n] [- n] [ input [ output ] ]
  6.  
  7. DESCRIPTION
  8.     Uniq reads the input file comparing adjacent lines.  In the normal case, 
  9.     the second and succeeding copies of repeated lines are removed; the 
  10.     remainder is written on the output file.  Note that repeated lines must be
  11.     adjacent in order to be found.  
  12.     
  13.     The options are:
  14.     
  15.     -u  Just the lines that are not repeated in the original file are output.
  16.     
  17.     -d  Just the one copy of the repeated lines is output.  
  18.     
  19.     -c  Generates an output in default style (-u and -d selected) but with 
  20.     each line preceded by a count of the number of times it occurred.
  21.  
  22.     -n  The first n fields together with any blanks before each are ignored.  
  23.     A field is defined as a string of non-space, non-tab characters 
  24.     separated by tabs and spaces from its neighbors.
  25.  
  26.     +n  The first n characters are ignored.  Fields are skipped before 
  27.     characters.
  28.  
  29.     The default option is the union of the -u and -d options (each unique
  30.     line is output).  The -c option supersedes -u and -d options.
  31.    
  32.     The n for the field and character count has to be a separate argument.
  33.  
  34. SEE ALSO
  35.      sort, comm
  36.