| You are here: SillyDog701 > UNIX Guide >SillyDog701 > UNIX Guide > (index) |
To remove consecutive duplicate lines from a file:
uniq acc_nos accounts
This removes all consecutive duplicate lines from the file acc_nos and places the output in the file accounts.
To list the consecutive duplicate lines and the number of times that each occurs:
uniq -c tel_nos errors
This lists each of the consecutive duplicate lines in the file tel_nos and the number of times that each is repeated. The results are placed in the file errors.
UNIX Guide home |
search |
index
| Page URL: http://sillydog.org/unix/ [SillyDog701] [Netscape] [MozInfo701] [MacCentre701] [UNIX Guide] [AntTunes701][Forums] [Search] [Change Log] [Feedback] [About Us] [Sitemap] This UNIX Guide maintained by SillyDog701, portion of this Guide is based on UNIXhelp. UNIXhelp is copyright University of Edinburgh. This page was last modified on 14 March, 2006 |
support MozInfo701 and SillyDog701 |