Skip to content

Instantly share code, notes, and snippets.

@serverwentdown
Forked from anonymous/compare.sh
Created December 20, 2012 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save serverwentdown/4345494 to your computer and use it in GitHub Desktop.
Save serverwentdown/4345494 to your computer and use it in GitHub Desktop.
clear
echo ""
echo " ---- CHECKING MD5 ---- "
echo ""
echo ""
SUM=$(openssl md5 "$2")
BFO="MD5($2)= "
echo "MD5 TO CHECK WITH"
echo "----------------------------------"
echo ""
echo "$BFO$1"
echo ""
echo ""
echo "FILE'S MD5"
echo "----------------------------------"
echo ""
echo "$SUM"
echo ""
echo ""
if [ "$BFO$1" == "$SUM" ]
then
echo "----------------------------------"
echo "| M D 5 MATCHES ! :) |"
echo "----------------------------------"
echo " --- HAPPPY MD5ing! --- "
else
echo "----------------------------------"
echo "| M D 5 DOES NOT MATCH ! :( |"
echo "----------------------------------"
fi
echo ""
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment