Tuesday, May 6, 2008

Duplicate lines

I have a ascii file which seemed to have duplicate lines.

Here is a Perl one liner which will go through the file and prints those duplicate lines once it encounters.


perl -lne 'print if $s{$_}++'



No comments: