I had same problem, however, after a while of googling, I found that md5 has hidden switch -r

$md5 myfile.txt
MD5 (myfile.txt) = 2930560673edb5b823e0818265737914

$md5 -r myfile.txt
2930560673edb5b823e0818265737914 myfile.txt