Skip to content

Instantly share code, notes, and snippets.

@d4v3y0rk
Last active August 29, 2015 14:23
Show Gist options
  • Save d4v3y0rk/d0b22b69cfe434d54871 to your computer and use it in GitHub Desktop.
Save d4v3y0rk/d0b22b69cfe434d54871 to your computer and use it in GitHub Desktop.
shell script to do md5 hash match verification
#!/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