title: bash If-else on Mac
body: <p>Why such a simple script does not work?</p>
  
  <pre><code>  1 for i in {1..6}
    2 do
    3     if[ "$i" -lt "3" ]
    4     then
    5         echo "a"
    6     else
    7         echo "b"
    8     fi
    9 done
  </code></pre>
  
  <p>or</p>
  
  <pre><code>  1 for i in {1..6}
    2 do
    3     if[ "$i" &lt; 3 ]
    4     then
    5         echo "a"
    6     else
    7         echo "b"
    8     fi
    9 done
  </code></pre>
  
  <p>Err:</p>
  
  <pre><code>./test.sh: line 4: syntax error near unexpected token `then'
  ./test.sh: line 4: `    then'
  </code></pre>