title: Calculate modulo in sh script
body: <p>I am working on an sh script in which I am in a WHILE loop where a variable gets incremented every iteration, and I'd like to save a file every five iterations.</p>
  
  <p>What I'd normally do (say in C) would be to do an <code>if ( n % 5 == 0)</code> test, but I don't know whether that's possible here..?  If it isn't, does anyone have any ideas that would get the job done?</p>
  
  <p>Cheers!</p>