title: Sort and remove duplicates based on column
body: <p>I have a text file:</p>
  <pre><code>$ cat text
  542,8,1,418,1
  542,9,1,418,1
  301,34,1,689070,1
  542,9,1,418,1
  199,7,1,419,10
  </code></pre>
  <p>I'd like to sort the file based on the first column and remove duplicates using <code>sort</code>, but things are not going as expected.</p>
  <h3>Approach 1</h3>
  <pre><code>$ sort -t, -u -b -k1n text
  542,8,1,418,1
  542,9,1,418,1
  199,7,1,419,10
  301,34,1,689070,1
  </code></pre>
  <p>It is not sorting based on the first column.</p>
  <h3>Approach 2</h3>
  <pre><code>$ sort -t, -u -b -k1n,1n text
  199,7,1,419,10
  301,34,1,689070,1
  542,8,1,418,1
  </code></pre>
  <p>It removes the <code>542,9,1,418,1</code> line but I'd like to keep one copy.</p>
  <p>It seems that the first approach removes duplicate but not sorts correctly, whereas the second one sorts right but removes more than I want. How should I get the correct result?</p>