title: How to know if file in a loop is the last one?
body: <p>Example</p>
  
  <pre><code>for FILE in $DIR/* 
  do
    if(&lt;is last File&gt;)
      doSomethingSpecial($FILE)
    else
      doSomethingRegular($FILE)
    fi
  done
  </code></pre>
  
  <p>What to call for <code>&lt;is last file&gt;</code> to check if the current file is the last one in the array ?</p>
  
  <p>Is there an easy built-in check without checking the array's length by myself ?</p>