title: bash : syntax to compute modulus
body: <p>What is correct bash syntax for modulus ?  </p>
  
  <p>My script has a loop that needs to take some action each 100 repetitions ( such as write to a log ) : </p>
  
  <pre><code>counter = 0
  ...
  divisor = 100
  remainder = 0
  remainder = counter%=divisor
  if $remainder = 0; then ...; else ... ; fi
  </code></pre>
  
  <p>but I receive error : </p>
  
  <pre><code>counter%=divisor: command not found
  </code></pre>