title: removing a character from a file with sed leads to an empty file
body: <p>I am on a mac and I am trying to set up a cron task to remove all instances of the '#' from my /etc/hosts file</p>
  <p>I use this command:</p>
  <p><code>sed 's/\#//g' /etc/hosts </code></p>
  <p>which seems to work fine, but when I do this to output it to replace the content in /etc/hosts:</p>
  <p><code>sed 's/\#//g' /etc/hosts &gt; /etc/hosts</code></p>
  <p>the /etc/hosts file ends up being empty. Why is it ending up empty?</p>