Created
February 6, 2017 18:48
-
-
Save kitzy/906abbc5c4ffabff5e68a6a1e579479c to your computer and use it in GitHub Desktop.
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 | |
KNOWNHASH="" | |
FILEPATH="" | |
TESTHASH=$(md5 ${FILEPATH} | awk '{print $4}') | |
if [ ! -e "${FILEPATH}" ] | |
then | |
echo "<result>not found</result>" | |
else | |
if [ "${TESTHASH}" == "${KNOWNHASH}" ] | |
then | |
echo "<result>match</result>" | |
else | |
echo "<result>no match</result>" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment