title: Bash: Generate md5 hash of string with special characters
body: <p>i would like to create a bash script that creates the md5-hash of a string.
  BUT the string can contain special characters and spaces. How can i get it that such a string is readable for eg. md5sum?</p>
  
  <p>I have written the following script as "md5.sh":</p>
  
  <pre><code>#!/bin/bash
  echo -n $1 | md5sum | awk '{print $1}'
  </code></pre>
  
  <p>But if i use "./md5.sh " (with a space at the end) this will not be recognized.
  Also quoted cannot be read from the script. And a single " will end in an prompt...</p>
  
  <p>Hope someone can help me :)</p>