Created
October 27, 2015 11:59
-
-
Save element6/76253202c4b71b3a3067 to your computer and use it in GitHub Desktop.
md5check bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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