bash – md5sum – remove trailing newlines gary 12 years ago The following code will remove trailing line breaks that come from the md5sum command: echo -n "test" | md5sum | tr -d '\n'