sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

uniq.1 (827B)


      1 .Dd 2015-10-08
      2 .Dt UNIQ 1
      3 .Os sbase
      4 .Sh NAME
      5 .Nm uniq
      6 .Nd report or filter out repeated lines in a file
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Op Fl c
     10 .Op Fl d | u
     11 .Op Fl f Ar num
     12 .Op Fl s Ar num
     13 .Op Ar input Op Ar output
     14 .Sh DESCRIPTION
     15 .Nm
     16 reads the
     17 .Ar input
     18 file and writes one copy of a line from each group of consecutive
     19 duplicate lines to the
     20 .Ar output
     21 file. If no
     22 .Ar input
     23 file is given
     24 .Nm
     25 reads from stdin. If no
     26 .Ar output
     27 file is given
     28 .Nm
     29 writes to stdout.
     30 .Sh OPTIONS
     31 .Bl -tag -width Ds
     32 .It Fl c
     33 Prefix each line with the number of consecutive occurrences in
     34 .Ar input .
     35 .It Fl d | Fl u
     36 Print duplicate | unique lines only.
     37 .It Fl f Ar num | Fl s Ar num
     38 Ignore the first
     39 .Ar num
     40 fields | characters in each input line when doing comparisons.
     41 .El
     42 .Sh STANDARDS
     43 The
     44 .Nm
     45 utility is compliant with the
     46 .St -p1003.1-2013
     47 specification.