Skip to content

Instantly share code, notes, and snippets.

@element6
Created October 27, 2015 11:59
Show Gist options
  • Save element6/76253202c4b71b3a3067 to your computer and use it in GitHub Desktop.
Save element6/76253202c4b71b3a3067 to your computer and use it in GitHub Desktop.
md5check bash
md5check(){
MSG=$(md5 $1 | grep -e "= $2$")
if [ -z "$MSG" ]; then
echo "Failed"
else
echo $MSG "Match"
fi
}
usage: md5check <filename> <md5sum to match>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment