title: execute a command during every n-th iteration
body: <p>I would like to print "is OK" during every odd loop iteration(first, third, fifth, etc) and print "is not OK" during every even loop iteration(second, fourth, sixth, etc). I'm able to accomplish this with:</p>
  
  <pre><code>$ for (( i=0,j=24,k=48; i&lt;=200; i=i+48,j=j+48,k=k+48 )); do printf '%s\n%s\n' ""$i" to "$j" is OK" ""$j" to "$k" is not OK"; done
  0 to 24 is OK
  24 to 48 is not OK
  48 to 72 is OK
  72 to 96 is not OK
  96 to 120 is OK
  120 to 144 is not OK
  144 to 168 is OK
  168 to 192 is not OK
  192 to 216 is OK
  216 to 240 is not OK
  $ 
  </code></pre>
  
  <p>However, is there a more elegant solution to accomplish the same?</p>