Skip to content

Instantly share code, notes, and snippets.

@enil
Created December 22, 2016 11:47
Show Gist options
  • Save enil/f7ec10b07001b3aed078063daaa5bb05 to your computer and use it in GitHub Desktop.
Save enil/f7ec10b07001b3aed078063daaa5bb05 to your computer and use it in GitHub Desktop.
Verify SHA-256 checksums of only the files that exist
# sha256sum doesn't like if the checksum file contains entries for missing files
awk '{ if (system("test -f " $2) == 0) { print $0 } }' $1 | sha256sum -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment