title: shell script : nested loop and continue
body: <pre><code>while [condition]
  do
    for [condition]
    do
      if [ "$x" &gt; 3 ];then
        break
      fi
    done
  
    if [ "$x" &gt; 3 ];then
      continue
    fi
  done
  </code></pre>
  
  <p>In the above script I have to test <code>"$x" &gt; 3</code> twice. Actually the first time I test it, if it is true I want to escape the while loop and continue to the next while loop.</p>
  
  <p>Is there any simpler way so I can use something like <code>continue 2</code> to escape the outer loop?</p>