title: How to replace a string in multiple files using grep and sed when the -i argument is not supported?
body: <p>I have tried this command,</p>
  
  <pre><code>grep '/static' dir/* | xargs sed -i 's/\/static//g'
  </code></pre>
  
  <p>but the version of sed I am using does not support the -i argument.</p>
  
  <p>To replace a string in a file, to the same input file as the output, I normally do this:</p>
  
  <pre><code>sed 's/\/static//g' filename.txt &gt; new_filename.txt ; mv new_filename.txt filename.txt
  </code></pre>