title: How to increment a zero padded int in Bash
body: <p>I have a set of records to loop. The numbers range from 0000001 to 0089543 that ill call UIDX.</p>
  
  <p>if i try something like:</p>
  
  <pre><code>for ((i=0; i&lt; 0089543; i++)); do
      ((UIDX++))
  done
  </code></pre>
  
  <p>counter increments 1, 2, 3, 4 as opposed to the 0000001, 0000002... that i need.</p>
  
  <p>what is the best way to pad those leading zero's?</p>