35.20 Quick Reference: uniquniq is used to remove duplicate adjacent lines from a sorted file, sending one copy of each line to standard output or to a second file, if one is specified on the command line.
uniq is often used as a filter ( 1.30 ) . See also comm ( 28.12 ) , sort ( 36.1 ) , and especially sort -u ( 36.6 ) . options
You can specify only one of the options Examples
To send only one copy of each line from
To show which names appear more than once:
To show which lines appear exactly three times:
- from O'Reilly & Associates' UNIX in a Nutshell (SVR4/Solaris) |
|