title: Export every line (excpet last line ) of a file to create a new file for each line using AWK
body: <p>For example if there are n no of lines, then n-1 no of files should be created.
  Here is what i have achieved so far. I am manually inserting 8 (i.e. total no of lines). I dont know how to get total no of lines in a variable and then use it.</p>
  
  <pre><code>awk '{if (NR&lt;8) F=NR".ndjson"; print &gt;&gt; F; close (F)}' export.ndjson
  </code></pre>