I have a huge delimited file that I want to sort by its 2nd column. I need to use a tab character as a field separator in a cygwin sort. So I need something like this:
sort -t \t -k 2,2 in.txt > out.txt
But the command line evaluates "\ t" literally, and not as a tab character. Please note that I need to do this on a computer running Windows Cygwin. Variations such as
sort -t "\t" sort -t \"\t\"
does not work, and does not put it in a cmd file with the actual tab instead of \ t above.
Edit: a solution using a DOS shell or a Cygwin bash shell is fine.
sorting cygwin
Nikhil
source share