title: Read From Multiple CSV Files in a loop in shell
body: <p>I have a requirement of reading some <em>CSV</em> files one by one, <em>CSV</em> files will be named  <em>Test1.csv</em>,<em>Test2.csv</em>, etc.  The code:</p>
  <pre><code>     #!/bin/bash
       IFS=&quot;,&quot;
       FILES=/CSVFiles/*
       CSVNAME=Test
       n=1
       for f in $FILES 
      while read Column1 Column2 
      do
              echo $Column1
              echo $Column2
      done &lt; &quot;$CSVNAME&quot;$n.csv
      n=$((n+1))
  </code></pre>
  <p>Returns these errors:</p>
  <blockquote>
  <p>./ReadCSV.sh: line 23: syntax error near unexpected token `while'</p>
  <p>./ReadCSV.sh: line 23: `while read Column1 Column2</p>
  </blockquote>