Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Linux/Remove Duplicate In A File

September 14, 2018

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

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

Filed Under: Linux Tagged With: duplicate, perl

Have content delivered to your mail. Subscribe below.

About Me

I'm Ulysses, Cloud Engineer at Cardinal Health based in Columbus. This blog is about Linux and Cloud technology. When off the grid, I enjoy riding my electric skateboard. I've surfed, snowboarded and played the saxophone in the past. I hope you find this website helpful. It's powered by WordPress and hosted on AWS LightSail.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021