title: Correct usage for coreutils join and sort
body: <p>I am trying to use the standard command-line tool <code>join</code> to join two files. According to the documentation, both input files need to be sorted for this. Initially I just piped them through <code>sort</code> to achieve this, but this still resulted in errors like "join: file 2 is not in sorted order". I then looked into this a bit more closely and found that I was supposed to use <code>sort -k 1b,1</code>, but that didn't seem to help either. I even played around with the locales (setting <code>LANG=C</code> or <code>LANG=EN_en</code>) but nothing seems to work.</p>
  
  <p>So far I tried:</p>
  
  <ul>
  <li><code>cat x | sort | join -j 1 a -</code></li>
  <li><code>cat x | sort -k1b,1 | join -j 1 a -</code></li>
  <li><code>cat x | LANG=C sort -k1b,1 | join -j 1 a -</code></li>
  <li><code>cat x | LANG=EN_en sort -k1b,1 | join -j 1 a -</code></li>
  </ul>
  
  <p>So, how do I use join correctly on unsorted files?</p>