Calculate md5sum from an input string

md5sum <<< YOUR_TEXT | cut -f1 -d' '

May 17, 2013kowalcj0

Explanation

Calculate a MD5 sum/digest from an input string

Wrap it up in a function:

function md5() { md5sum <<< $1 | cut -f1 -d' '; }

Example usage:

md5 "this is a long string test_string"
md5 singleWordExample