uniq options filename optional_new_filename
If no optional_new_filename is specified, the output of uniq will be printed to standard output.
As you might expect, it is most common to run the uniq utility after having already sorted the file. Below is an example on how you might use the "uniq" utility.
The "uniq" utility comes with several useful utilities. The more common ones are described below
|-c||Produces a columnar output in which the left column reports the number of times the line was repeated|
|-d||Displays one copy of each repeated line, but does not display non- repeated lines.|
|-u||Non repeated lines are displayed, but repeated lines are not.|
Consider the following examples