Getting MD5 hashes under Unix/Linux etc.

Scripting under different unices is a bit painful. Especially if you have a completely mixed environment with plenty of obsolete systems in it. I was trying to get md5sum of something quickly. Here is the result:

Sure, you can use md5sum command on every system if you install it, but this seems like the most painless way. Still failing on some old Solaris (like 8/9) but luckily I can skip those :)