title: awk - fatal error while reading file
body: <p>I am stuck with below issue related to <code>awk</code> command. </p>
  
  <p>As per below function, Input-command produces 5 csv files &amp; dump them into respective csvFolder. Issue is when function is called it is throwing below error as <code>awk</code> does not get value of <code>$I</code>. </p>
  
  <blockquote>
    <p>awk: fatal: .... reading (No such file or directory)</p>
  </blockquote>
  
  <p>Is there any way to bypass this awk condition if csv files are not there in csvFolder or csvFolder2?</p>
  
  <pre><code>Function() {
  
  #CSV prducer command
  
  Input-command="$command-to-calculate"
  
  #Parse csv files to get row count which do not have special-word
  
  for I in csvFolder/*.csv
  Do
     Var=$(awk 'NR&gt;1' csvFolder/$I | grep -cv 'special-word')
     Echo $Var
  Done 
  
  #CSV prducer command no. 2
  
  Input-command-2="$command-to-calculate" 
  
  #Parse csv files to get row count which do not have special-word
  
  for I in csvFolder2/*.csv
  Do 
     Var=$(awk 'NR&gt;1' csvFolder2/$I | grep -cv 'special-word')
     Echo $Var
  Done 
  
  }
  </code></pre>