title: Best way to check if a text file containing 1 billion rows of number from 1 to 1B
body: <p>If I had a program to generate 1 billion numbers and output it to a text file. What is the best way to check if that file containing enough number?
  For example my output text file should be like below</p>
  <pre><code>1
  2
  ....
  1001
  1002
  1003
  ...
  1000000000
  </code></pre>
  <p>The <strong>auditor program</strong> should check if the file contains 1 billion rows and those number must be in ascending order</p>