title: How to represent hexadecimal number with two digits in linux scripts (bash)
body: <p>I have a problem.
  I must represent each number with exactly 2 digits (i.e. 0F instead of F)</p>
  
  <p>my code looks something like that:<br>
  1. read number of ascii chars are in an environment variable (using wc -w)<br>
  2. converting this number to hexadecimal (using bc).</p>
  
  <p>How can I make sure the number I'll get after stage 2 will include a leading 0 (if necessary)</p>
  
  <p>Thanks,
  Amigal </p>