title: Bash - Different Value of parameter Inside If condition
body: <p>input from file $2 : 1 -> 2</p>
  
  <pre><code>while read -a line; do
  
    if (( ${line[2]} &gt; linesNumber )); then
    echo "Graph does not match known sites4"
      exit
    fi
  
  done &lt; "$2"
  </code></pre>
  
  <p>For some reason inside the <code>if</code> condition, the value of <code>${line[2])</code> is not <code>2</code> 
  but if I print the value outside <code>if</code>:</p>
  
  <pre><code>echo `${line[2]}`
  
  2
  </code></pre>