GNU Info

Info Node: (textutils.info)The uniq command

(textutils.info)The uniq command


Next: Putting the tools together Prev: The sort command Up: Opening the software toolbox
Enter node , (file) or (file)node

The `uniq' command
==================

   Finally (at least for now), we'll look at the `uniq' program.  When
sorting data, you will often end up with duplicate lines, lines that
are identical.  Usually, all you need is one instance of each line.
This is where `uniq' comes in. The `uniq' program reads its standard
input, which it expects to be sorted.  It only prints out one copy of
each duplicated line.  It does have several options.  Later on, we'll
use the `-c' option, which prints each unique line, preceded by a count
of the number of times that line occurred in the input.


automatically generated by info2www version 1.2.2.9