title: Integer expression expected
body: <p>I want to read my files line by line every 5 seconds. This time I just tried one-line bash command to do this.
  And bash command is:</p>
  
  <pre><code>let X=1;while [ $X -lt 20 ];do cat XXX.file |head -$X|tail -1;X=$X+1;sleep 5;done
  </code></pre>
  
  <p>However I got the error like:</p>
  
  <pre><code>-bash: [: 1+1: integer expression expected
  </code></pre>
  
  <p>What's the problem?
  btw, why can't we do $X &lt; 20? (Instead we have to do -lt, less than?)</p>
  
  <p>thx</p>