title: Sorting unique by column - sort command?
body: <p>I have this file:</p>
  
  <pre><code>hello 1
  hello 2
  world 1
  world 2
  hello 3
  hi    3
  hi    4
  </code></pre>
  
  <p>I want to sort this like so,</p>
  
  <pre><code>hello 1
  hi  3
  world 1
  </code></pre>
  
  <p>The thing is I need only the first unique item in column 1.</p>
  
  <p>I tried <code>sort -k1 -u file.txt</code> but it isn't working as I expect. How do I go about this?</p>