title: bash while break out of cycle not loop?
body: <p>Anyone know of a simple way to immediately exit the current iteration of a while/until loop in bash, but continue to the next iteration in the loop?</p>
  
  <p>My basic structure is:</p>
  
  <pre><code>sort -u -r -g -k 5 -t ' ' $filteredtoptrigsf |\
  while read -a linA; do
  
   stuff
   morestuff
  
   [[ $smthStinks -eq 1 ]] &amp;&amp; break
  
   [[ ${linA[*]} == $onlyThisLineStinks ]]  &amp;&amp;  done
  
   lotsaSlowProcessing
  
   doSmthDangerous
  
  done
  </code></pre>
  
  <p>In the first [[ ... ]] test I definitely want break out of the while loop and never come back, due to some calculated conditions.</p>
  
  <p>In the second [[ ]] test a condition is met that should only break out of the cycle once, avoiding further code below it, but continue reading the next line of input and let while continue.</p>
  
  <p>As you can see I tried <code>done</code> there but that only errors with token unexpected.</p>
  
  <p>I would rather not wrap much of the loop's code inside if's and else's since there are actually quite of few terminating conditions, both global and for current cycle only.</p>