Remove Duplicate In A File

Here’s a Perl script for removing duplicates in a file.

perl -ne 'print unless $dup{$_}++;' input_file > output_file