title: bash: different sort output on files with identical first column
body: <p>Sorry for the vague title, I couldn't think of a better one...</p>
  
  <p>I have <strong>2 tab-delimited files</strong> with identical first columns (different numbers of total columns). I would like to sort <strong>both files by their first column.</strong></p>
  
  <p>I think I could do this either with it -t\t option or the -k1,12 option (since first column is never longer than 12 characters.) Both options produce the same (wrong) output.</p>
  
  <p>Even though both files have the same first column, they are sorted differently. Notice that on the file1 I get <strong>23,29,2;</strong> file2, I get <strong>2,23,29.</strong></p>
  
  <pre><code>$ head  file1 | sort -t\t | cut -f1
  rs1000000
  rs10000010
  rs10000012
  rs10000013
  rs10000017
  rs10000023
  rs10000029
  rs1000002
  rs10000030
  
  $ head file2 | sort -t\t | cut -f1
  rs1000000
  rs10000010
  rs10000012
  rs10000013
  rs10000017
  rs1000002
  rs10000023
  rs10000029
  rs10000030
  </code></pre>
  
  <p><strong>how I can I sort both files such that the first column is in the same order in each?</strong>
  Thank you!</p>