I am looking for a simple way to pipe the result of md5sum into another command. Something like this:
$echo -n 'test' | md5sum | ...
My problem is that md5sum outputs not only the hash of the string, but also an hypen, which indicates that the input came from stdin. I checked the man file and I didn't find any flags to control output.

echo -nwhen the text data is unknown. Useprintf '%s' "$DATA"instead. Unlikeecho -n "$DATA", it will work whenDATA="-n"(among other examples).