diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-29 15:02:27 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-29 15:02:27 -0800 |
commit | 7c6afa0a21883dc8037f3d021246db24eef39b41 (patch) | |
tree | 3fa7c1e595248a46e88ea62c2f9f70106186b0fe /extra/cleanups/check_hashes.sh | |
parent | c32154f2875a7fb9aac727013e1475cdd811e180 (diff) | |
download | fatcat-7c6afa0a21883dc8037f3d021246db24eef39b41.tar.gz fatcat-7c6afa0a21883dc8037f3d021246db24eef39b41.zip |
clean up extra/ folder a bit
Diffstat (limited to 'extra/cleanups/check_hashes.sh')
-rwxr-xr-x | extra/cleanups/check_hashes.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/extra/cleanups/check_hashes.sh b/extra/cleanups/check_hashes.sh new file mode 100755 index 00000000..94102329 --- /dev/null +++ b/extra/cleanups/check_hashes.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -e -u -o pipefail + +export LC_ALL=C + +HASH_FILE=$1 + +zcat $HASH_FILE \ + | awk '{print $3 "\t" $1}' \ + | rg -v '^\t' \ + | sort -S 4G \ + | uniq -d -w 40 \ + > sha1_ident.dupes.tsv + +wc -l sha1_ident.dupes.tsv >> counts.txt |