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

May 17, 2013, 8:17 p.m.kowalcj0

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