hassek

Remember

My code snippets

When you have a file full of duplicates and you want to count them up for any reason, unix like scripts are always there to help! Let’s say we have a file names emails.txt

lewl@gmail.com
boom@gmail.com
lewl@gmail.com
jhon.mcduck@hotmail.com
lewl@gmail.com

Now, applying unix magic

sort emails.txt| uniq -c                                                                                                  [~/WebSites/hassek.github.io]
   1 boom@gmail.com
   1 jhon.mcduck@hotmail.com
   3 lewl@gmail.com