title: Sort a file to put 10, 11, 12... before 1, 2, 3... and X,Y
body: <p>I have a list of chromosome data with the columns (chromosome, start, and end) like this:</p>
  
  <pre><code>chr1    6252071 6253740
  chr1    6965107 6966070
  chr1    6966038 6967016
  chr1    7066595 7068694
  chr1    7100956 7102296
  chr1    7153422 7154635
  chr1    7155112 7156181
  ....
  chr2
  ....
  chr10
  ....
  chrX
  ....
  chrY
  ....
  </code></pre>
  
  <p>etc.</p>
  
  <p>I am trying to use bash to sort the chromosome sections to this order:  </p>
  
  <pre><code>chr10
  chr11
  chr12
  chr13
  chr14
  chr15
  chr16
  chr17
  chr18
  chr19
  chr1
  chr2
  chr3
  chr4
  chr5
  chr6
  chr7
  chr8
  chr9
  chrM
  chrX
  chrY
  </code></pre>
  
  <p>in the first column, and then in numerical order by start position in the second column, but no variation of <code>sort</code> seems to do the job. Any ideas? Thanks.</p>