title: Copy/Paste part of a file into another file using Terminal (or Shell)
body: <p>I am trying to copy part of a .txt file from the line number n to the line number n+y (let's say 1000 to 1000000). </p>
  
  <p>I tried with operators and <strong>sed</strong>, and it failed. Here's the command I tried:</p>
  
  <pre><code>sed -n "1000, 1000000p" path/first/file &gt; path/second/file
  </code></pre>