in reply to Find duplicate lines from the file and write it into new file.

is the file sorted? if so, a simple uniq -d foo.txt > dups.txt will do it..
I wrote one coding but I have 'Out of memory Error'
What's the code look like? Someone here may be able to provide suggestions on how to make it more efficient if you post the snippet.
  • Comment on Re: Find duplicate lines from the file and write it into new file.
  • Download Code