Last active
December 16, 2015 08:39
-
-
Save dpapathanasiou/5407640 to your computer and use it in GitHub Desktop.
Since mac osx does not have the sha1sum tool installed (why, Apple, why?) this script gets openssl to produce the same output.
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/sh | |
# since mac osx does not have the sha1sum tool installed | |
# this script gets openssl to produce the same output | |
if [ $# -ne 1 ] | |
then | |
echo "Usage:\n\n$0 [file to check]" | |
else | |
openssl sha1 $1 | sed 's/.*(\(.*\))= \(.*\)$/\2 \1/' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment