title: Syntax for a Bash single-line while loop with condition
body: <p>I gone through <a href="https://stackoverflow.com/questions/1289026/syntax-for-a-single-line-bash-infinite-while-loop">single line inifinite while loop</a> in bash, and trying to add a single line while loop with condition. Below I have mentioned my command, which gives unexpected result (It is suppose to stop after 2 iterations, but it never stops. And also it considers variable I as executable).</p>
  
  <p>Command:</p>
  
  <pre><code>i=0; while [ $i -lt 2 ]; do echo "hi"; sleep 1; i = $i + 1; done
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>hi
  The program 'i' is currently not installed. To run 'i' please ....
  hi 
  The program 'i' is currently not installed. To run 'i' please ....
  hi 
  The program 'i' is currently not installed. To run 'i' please ....
  ...
  ...
  </code></pre>
  
  <p>Note: I am running it on Ubuntu 14.04</p>