Skip to content

Instantly share code, notes, and snippets.

@dpapathanasiou
Last active December 16, 2015 08:39
Show Gist options
  • Save dpapathanasiou/5407640 to your computer and use it in GitHub Desktop.
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.
#!/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