Skip to content

Instantly share code, notes, and snippets.

@jcmartins
Created February 5, 2016 16:13
Show Gist options
  • Save jcmartins/9e71c895d99090fb40cf to your computer and use it in GitHub Desktop.
Save jcmartins/9e71c895d99090fb40cf to your computer and use it in GitHub Desktop.
Work with Duplicate lines inside a text file
awk '!seen[$0]++' filename
or
sort -u -o filename1.txt filename2.txt
write dup files into text file
sort file1.txt file2.txt | uniq -d > duplicity.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment