Created
December 28, 2019 12:00
-
-
Save randria/d04adc22a04c2295635853694f9332b0 to your computer and use it in GitHub Desktop.
list duplicates and remove them
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
shasum -a 256 * > initial.txt | |
sort initial.txt | awk 'BEGIN{lasthash = ""} $1 == lasthash {print $0} {lasthash = $1}' > duplicates.txt | |
comm -23 initial.txt duplicates.txt > cleaned.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment