title: "syntax error near unexpected token `do'" in Bash script
body: <p>I'm writing a Bash script. When I run it, I get a syntax error I don't understand.</p>
  
  <p>Here my script:</p>
  
  <pre><code>#!/bin/bash
  i=1
  while [ $i -le "6" ]
   do
   j=1
   i=`expr $i +1`
   echo \
   while [ $j -le "$i" ]
     do
     echo $i
     j=`expr $j+1`
   done
  done
  echo \enter code here
  </code></pre>
  
  <p>Here the error:</p>
  
  <pre><code>./test.sh: line 9: syntax error near unexpected token `do'
  ./test.sh: line 9: `do'
  </code></pre>
  
  <p>What am I doing wrong?</p>