title: csh/sh for loop - how to?
body: <p>i'm trying to write a for loop that executes 2 scripts on FreeBSD. I don't care if it's written in sh or csh. I want something like:</p>
  
  <pre><code>for($i=11; $i&lt;=24; $i++)
  {
     exec(tar xzf 'myfile-1.0.' . $i);
     // detect an error was returned by the script
     if ('./patch.sh')
     {
        echo "Patching to $i failed\n";
     }
  }
  </code></pre>
  
  <p>Does anyone know how to do this please?</p>
  
  <p>Thanks</p>