title: shell command (involving sed) works in bash but not in rake task on mac os
body: <p>I have a rake task that performs a shell command. When I run it from bash, the substitution worked, but when I run the rake task, the substitution did not take place.</p>
  
  <p>My rake file:</p>
  
  <pre class="lang-ruby prettyprint-override"><code>require 'rake'
  namespace 'performance_tests' do
    task :test_guests_generation do
  
      %x{sed -e 's/NO_OF_GUESTS = \[.*]/NO_OF_GUESTS = \[400, 10]/' -i '' db/seeds.rb}
    end
  end
  </code></pre>
  
  <p>Trying the command in Mac OS Terminal does perform the substitution:</p>
  
  <pre class="lang-sh prettyprint-override"><code>$ sed -e 's/NO_OF_GUESTS = \[.*]/NO_OF_GUESTS = \[400, 10]/' -i '' db/seeds.rb
  </code></pre>