Skip to content

Instantly share code, notes, and snippets.

Created December 20, 2012 14:08

Revisions

  1. @invalid-email-address Anonymous created this gist Dec 20, 2012.
    32 changes: 32 additions & 0 deletions compare.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    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 ""