Created
September 26, 2017 22:58
-
-
Save tsleyson/34d782ef10375f8a5c2d1c21d585e7fe to your computer and use it in GitHub Desktop.
Bash commands to find and list duplicated lines in a file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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