Created
December 8, 2016 15:28
-
-
Save skorotkiewicz/9587486a39c3e2c4632d0a22d03ac376 to your computer and use it in GitHub Desktop.
Create md5 from string in Linux
This file contains hidden or 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 | |
# How to install? | |
# nano /usr/bin/md5 | |
# copy&paste this code to /usr/bin/md5 | |
# chmod +x /usr/bin/md5 | |
if [ $1 ] | |
then | |
hash="$(echo -n "$1" | md5sum )" | |
echo "$hash" | |
else | |
echo "Example usage: md5 <you-string>" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment