title: use sed to delete patterns on a range of lines
body: <p>I have a large text file that I would like to divide into segments and use sed to delete certain patterns in place. I would like to do this in a single command line using a pipe. For example:</p>
  
  <pre><code>sed -n 1,10p &lt;text file&gt; | sed -i 's/&lt;pattern to remove&gt;//'
  </code></pre>
  
  <p>The code above attempts to take the first 10 lines of the text file and remove the patterns from the 10 lines in place. The resulting text file should have the first 10 lines modified. The code above doesn't work because the second command after the pipe requires a input file. Please help!</p>