Skip to content

Instantly share code, notes, and snippets.

@KyCodeHuynh
Created June 18, 2016 03:53
Show Gist options
  • Save KyCodeHuynh/ed8c0e144a6aacf9bee2cdf732ffdb17 to your computer and use it in GitHub Desktop.
Save KyCodeHuynh/ed8c0e144a6aacf9bee2cdf732ffdb17 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Generate SHA-512 hashes of all PDF (or any other extension) files
for f in *.pdf
do
hash=`sha512sum $f`
echo "$f : $hash"
sha512sum $f >> "plaintext-file-hashes.txt"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment