Skip to content

Instantly share code, notes, and snippets.

@Diviector
Created January 13, 2022 04:38
Show Gist options
  • Save Diviector/68ba32e2226c7571a6ae44e017bea266 to your computer and use it in GitHub Desktop.
Save Diviector/68ba32e2226c7571a6ae44e017bea266 to your computer and use it in GitHub Desktop.
#!/bin/bash
file_checksum="$(sha256 $1 | awk '{print $1}')"
if [ "$2" == "$file_checksum" ]
then
echo OK
else
echo FAILD
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment