Skip to content

Instantly share code, notes, and snippets.

@tsleyson
Created September 26, 2017 22:58
Show Gist options
  • Save tsleyson/34d782ef10375f8a5c2d1c21d585e7fe to your computer and use it in GitHub Desktop.
Save tsleyson/34d782ef10375f8a5c2d1c21d585e7fe to your computer and use it in GitHub Desktop.
Bash commands to find and list duplicated lines in a file
#!/usr/bin/bash
echo $1
sort $1 | uniq -c | grep -v '^ *1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment