title: Bash- is it possible to use -uniq for only one column of a line?
body: <pre><code>    1.gui  Qxx  16
      2.gu   Qxy  23
      3.guT  QWS  18
      4.gui  Qxr  21
  </code></pre>
  
  <p>i want to sort a file depending a value in the 3rd column, so i use:</p>
  
  <pre><code>sort -rnk3 myfile
  
  2.gu   Qxy  23
  4.gui  Qxr  21
  3.guT  QWS  18
  1.gui  Qxx  16
  </code></pre>
  
  <p>now i have to output as: (the line starting with 3.gui  is out because the line with 4.gui has a greater value)</p>
  
  <pre><code>2.gu   Qxy  23
  4.gui  Qxr  21
  1.guT  QWS  18
  </code></pre>
  
  <p>i can not use <code>-head</code> because i have millions of rows and i do not where to cut, i could not figure a way to use <code>-uniq</code> because it treats a line as whole and since i can not tell <code>-uniq</code> to look at first column, it counts a line which has  unique it outputs it -which is normal-. i know <code>-uniq</code> can ignore a number of characters but as you can see from example first column might have various character count..</p>
  
  <p>please advice..</p>