title: How do I sort a tab separated file on the nth column using cygwin sort?
body: <p>I have a huge tab separated file which I want to sort on its 2nd column. I need to use the tab character as the field delimiter in cygwin sort. So I need something like this:</p>
  
  <pre><code>sort -t \t -k 2,2 in.txt &gt; out.txt
  </code></pre>
  
  <p>But the command prompt evaluates '\t' literally and not as the tab character. Note that I need to do this on a Windows machine running Cygwin. Variations such as </p>
  
  <pre><code>sort -t "\t"
  sort -t \"\t\"
  </code></pre>
  
  <p>don't work, neither does putting this in a cmd file with an actual tab in place of the \t above.</p>
  
  <p>Edit: A solution using either the DOS shell or the Cygwin bash shell is fine.</p>