title: Dividing a file into separate files with 10,000 lines each
body: <p>I have a file which is too large for the software I am using, so I want to cut it into smaller parts. It is a plain text file. How can I cut it into seperate files. E.g.:</p>
  
  <ul>
  <li><code>output1.txt</code> contains the first 10,000 lines of the original file.</li>
  <li><code>output2.txt</code> contains the next 10,000 lines of the original file.</li>
  <li><p>etc.</p></li>
  <li><p>The last file would probably have less than 10,000 lines.</p></li>
  <li>If I wanted to join them back, I'd just use <code>cat output*.txt &gt; joined.tex</code>.</li>
  </ul>
  
  <p>How can I split the file in this way?</p>