The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 01-16-2008
shamrock shamrock is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2007
Location: USA
Posts: 750
Quote:
Originally Posted by orahi001 View Post
Hello,


I can remove duplicate entries in a file by:

sort File1 | uniq > File2

but how can I remove duplicates without sorting the file?

I tried cat File1 | uniq > File2 but it doesn't work



thanks
Many ways using awk or perl. Search this site using the duplicates keyword.