title: Infinite 'for' loop with Bash
body: <p>I have a script like</p>
  <pre><code>#!/bin/bash
  for i in {1..xx};do break=&quot;$i&quot;
  If....; then Some command
  else break;fi
  done
  </code></pre>
  <p>I need something which can repeat this script n times with incrementing $i.</p>
  <p>I tried this:</p>
  <pre><code>For (( ; ; )); do  i=1 &amp;&amp; echo $i &amp;&amp; ((i++));done
  </code></pre>
  <p>But this always shows 1, not an incrementing number. I also tried <code>$((i+=1))</code>.</p>
  <p>Where <code>xx</code> is must be endless number.</p>
  <p>Where <code>break=&quot;$i&quot;</code> gives me how many times repeated script.</p>