title: sed command with -i option failing on Mac, but works on Linux
body: <p>I've successfully used the following <code>sed</code> command to search/replace text in Linux:</p>
  
  <pre><code>sed -i 's/old_link/new_link/g' *
  </code></pre>
  
  <p>However, when I try it on my Mac OS X, I get:</p>
  
  <blockquote>
    <p>"command c expects \ followed by text"</p>
  </blockquote>
  
  <p>I thought my Mac runs a normal BASH shell.  What's up?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>According to @High Performance, this is due to Mac <code>sed</code> being of a different (BSD) flavor, so my question would therefore be how do I replicate this command in BSD <code>sed</code>?</p>
  
  <p><strong>EDIT:</strong> </p>
  
  <p>Here is an actual example that causes this:</p>
  
  <pre><code>sed -i 's/hello/gbye/g' *
  </code></pre>