title: Sorting in bash
body: <p>I have been trying to get the unique values in each column of a tab delimited file in bash. So, I used the following command. </p>
  
  <pre><code>cut -f &lt;column_number&gt; &lt;filename&gt; | sort | uniq -c
  </code></pre>
  
  <p>It works fine and I can get the unique values in a column and its count like </p>
  
  <pre><code>105 Linux
  55  MacOS
  500 Windows
  </code></pre>
  
  <p>What I want to do is instead of sorting by the column value names (which in this example are OS names) I want to sort them by count and possibly have the count in the second column in this output format. So It will have to look like:</p>
  
  <pre><code>Windows 500
  MacOS   105
  Linux   55
  </code></pre>
  
  <p>How do I do this?</p>