title: linux built-in read command flags
body: <p>I am running into an odd situation. I am on RHEL 6.3.  I am trying to use the built-in 'read' command to read the lines in the file in an array and to process it.</p>
  
  <p>In my script, I am using </p>
  
  <pre><code>while IFS=" " read -r -a appInfo
  do
      echo "4 ${appInfo[0]}"
      echo "4 ${appInfo[1]}"
      echo "4 ${appInfo[2]}"
      echo "4 line *{appInfo[@]}"
      currentApp="${appInfo[*]}"
  .....
  done &lt; details.txt
  </code></pre>
  
  <p>It is working fine, when I execute the script from the command line.  The read command shows the below info</p>
  
  <pre><code>read: usage: read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
  </code></pre>
  
  <p>If I do <code>read --version</code> on command line, I get </p>
  
  <p><strong>Commandline</strong> version         read (AT&amp;T Research) 2006-12-19</p>
  
  <p>But when I try to execute the exact same script from a Bamboo project,  the read command generates an error</p>
  
  <pre><code>read: -a: unknown option
  Usage: read [-ACprsv] [-d delim] [-u fd] [-t timeout] [-n nchar] [-N nchar]
              [var?prompt] [var ...]
  </code></pre>
  
  <p><strong>Bamboo :</strong> version         read (AT&amp;T Research) 2006-12-19</p>
  
  <p>So, if the version shows the same, why do the flags show differently?</p>
  
  <p>What could be the problem.  How can I solve the issue, so that I can read the line into an array even when running it from a Bamboo plan?</p>