Last active
August 29, 2015 14:23
-
-
Save d4v3y0rk/d0b22b69cfe434d54871 to your computer and use it in GitHub Desktop.
shell script to do md5 hash match verification
This file contains 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
#!/bin/bash | |
HASH=`md5 $2 | awk '{print $4}'` | |
if [ $1 == $HASH ]; then | |
echo "hashes match" && exit 0; | |
else echo "hashes are different" && exit 1; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment