title: How to use while read line with tail -n
body: <p><strong>Problem:</strong> I have a CSV dump file - with excess of 250,000 lines. When I use <code>while read</code> - it takes a while (no pun intended). I would like to go back to the last 10,000 lines to do what I need to do instead of the 250,000 lines.</p>
  
  <p><strong>Code Snippet:</strong> My current code is this:</p>
  
  <pre><code>IFS=","
  while read line
  do
  
      awk_var=`echo "$line" | awk -F" " '{print $0}'`
  
      var_array=($awk_var)
  
      read -a var_array &lt;&lt;&lt; "${awk_var}"
  
      echo "${var_array[1]}"
  
  
  done &lt;/some_directory/directory/file_in_question.csv
  </code></pre>
  
  <p><strong>Question:</strong> How can I use <code>tail -n10000</code> with <code>while read line</code> when reading the <code>file_in_question.csv</code> with a bash script?</p>