Skip to content

Instantly share code, notes, and snippets.

@skorotkiewicz
Created December 8, 2016 15:28
Show Gist options
  • Save skorotkiewicz/9587486a39c3e2c4632d0a22d03ac376 to your computer and use it in GitHub Desktop.
Save skorotkiewicz/9587486a39c3e2c4632d0a22d03ac376 to your computer and use it in GitHub Desktop.
Create md5 from string in Linux
#!/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