title: How would I remove all <script> tags (and everything in between) from multiple files using UNIX?
body: <p>I have a folder with multiple files, and I'd like to remove all <code>&lt;script&gt;</code> tags and everything in between, e.g.:</p>
  
  <p>This:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;function(foo);&lt;/script&gt;
  </code></pre>
  
  <p>As well as this:</p>
  
  <pre><code>&lt;script type="text/javascript" src="scripts.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I think in PHP it would be something like this:</p>
  
  <pre><code>&lt;?php $string = preg_replace('#(\n?&lt;script[^&gt;]*?&gt;.*?&lt;/script[^&gt;]*?&gt;)|(\n?&lt;script[^&gt;]*?/&gt;)#is', '', $string); ?&gt;
  </code></pre>
  
  <p>But I'm at a loss when it comes to UNIX.</p>