title: Bash script won't work: command not found
body: <p>I'm trying to create a simple shell script to list the first input 6 times, a line, then report the size of the second input. Here is my script:</p>
  <pre><code>#!/bin/sh
  
  #  script1.sh
  #  
  #
  #  $1=filename $2=number
  
  i=0
  
  while [$i -lt 7]    #line 11
  do
    i=$(($i + 1))
    echo $1
  done
  
  printf &quot;\n&quot;
  
  if [$2 -gt 1000]     #line 19
  then
    echo 'This is a big number!'
  else
    echo 'This is a small number.'
  fi
  </code></pre>
  <p>Here is the error I receive when trying to use:</p>
  <blockquote>
  <p>./script1.sh test 131234
  ./script1.sh: line 11: [0: command not found</p>
  <p>./script1.sh: line 19: [131234: command not found
  This is a small number.</p>
  </blockquote>
  <p>I suppose it partially works but something about the command -lt and -gt is causing an error. Running on both Linux and Terminal (OS X) provide the same error.</p>