Sort and Unique
Tagged with: command, file, line, Linux, sort, uniq, unique
Sort contents of a file and remove repeated lines
sort file.txt | uniq
Sort contents of a file and remove repeated lines
sort file.txt | uniq
This entry was posted on Sunday, May 11th, 2008 at 11:19 pm and is filed under Command Line, Linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
I am Binny V A, a freelance Web Developer on the LAMP Platform. Open Source Geek.
May 11th, 2008 23:29
You can specify multiple files if needed – just add it to the end of the sort command – sort file1 file2|uniq