title: Unexpected end of file Bash(last line)
body: <p>I tried almost all solutions suggested here but this very simple code of mine keeps showing this error</p>
  
  <pre><code>x=1
  echo $x
  while [$x -le 5];
  do
  echo $x
  x=$(($x+1))
  done
  </code></pre>
  
  <p>:</p>
  
  <pre><code>-sh-4.1$ sh test1.sh
  1
  test1.sh: line 10: syntax error: unexpected end of file
  </code></pre>
  
  <p>line 10 is one line after the "done" command. I know it has something to do with the spaces, but there aren't any spaces in my program. </p>