home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / GNUTUE.ZIP / man / uniq.man < prev    next >
Text File  |  1992-07-18  |  3KB  |  55 lines

  1. NAME
  2.      uniq - remove duplicate lines from a sorted file
  3.  
  4. SYNOPSIS
  5.      uniq [-cdu] [-f skip-fields] [-s skip-chars]  [-w  check-chars]  [-#skip-
  6.      fields]   [+#skip-chars]   [--count]   [--repeated]  [--unique]  [--skip-
  7.      fields=skip-fields] [--skip-chars=skip-chars] [--check-chars=check-chars]
  8.      [infile] [outfile]
  9.  
  10. DESCRIPTION
  11.      This manual page documents the GNU version  of  uniq.   uniq  prints  the
  12.      unique  lines  in  a  sorted  file,  discarding  all  but one of a run of
  13.      matching lines.  It can optionally show only lines  that  appear  exactly
  14.      once,  or  lines  that appear more than once.  uniq requires sorted input
  15.      because it compares only consecutive lines.
  16.  
  17.      If the output file is not specified, uniq writes to the standard  output.
  18.      If the input file is not specified, it reads from the standard input.
  19.  
  20.      OPTIONS
  21.  
  22.      -u, --unique
  23.           Only print unique lines.
  24.  
  25.      -d, --repeated
  26.           Only print duplicate lines.
  27.  
  28.      -c, --count
  29.           Print the number of times each line occurred along with the line.
  30.  
  31.      -, -f, --skip-fields=number
  32.           In this option, number is an  integer  representing  the  number  of
  33.           fields  to  skip  over  before  checking  for uniqueness.  The first
  34.           number fields, along with any blanks found before number  fields  is
  35.           reached,  are skipped over and not counted.  Fields are defined as a
  36.           strings of non-space, non-tab characters, that  are  separated  from
  37.           each other by spaces and tabs.
  38.  
  39.      --, -s, +skip-chars=number
  40.           In this option,  number  is  an  integer  represent  the  number  of
  41.           characters  to  skip over before checking for uniqueness.  The first
  42.           number  characters,  along  with  any  blanks  found  before  number
  43.           characters is reached, are skipped over and not counted.  If you use
  44.           both the field and character skipping options,  fields  are  skipped
  45.           over first.
  46.  
  47.      -w, +check-chars=number
  48.           Specify the number of characters to  compare  in  the  lines,  after
  49.           skipping  any  specified fields and characters.  Normally the entire
  50.           rest of the lines are compared.
  51.  
  52.      The long-named options can be introduced with `+' as well  as  `--',  for
  53.      compatibility with previous releases.  Eventually support for `+' will be
  54.      removed, because it is incompatible with the POSIX.2 standard.
  55.