title: Sort an associative array in awk
body: <p>I have an associative array in awk that gets populated like this:</p>
  
  <pre><code>chr_count[$3]++
  </code></pre>
  
  <p>When I try to print my <code>chr_counts</code>, I use this:</p>
  
  <pre><code>for (i in chr_count) {
      print i,":",chr_count[i];
  }
  </code></pre>
  
  <p>But not surprisingly, the order of i is not sorted in any way.
  Is there an easy way to iterate over the sorted keys of <code>chr_count</code>?</p>