title: incrementing shell variable.. what's wrong?
body: <p>I want to print Hey %d five times using shell script.</p>
  
  <pre><code> #/bin/csh
   set i=0
   while ($i &lt; 5)
   echo "i=$i"
   echo "Hey $i"
   set i=$i+1
   end
  </code></pre>
  
  <p>It gives me 
  while: Badly formed number.</p>
  
  <p>I'm sure the problem is in the incrementing line because if I remove the line, it prints Hey 0 repeatedly.</p>