Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 97189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:57:25+00:00 2026-05-10T23:57:25+00:00

I have a huge tab separated file which I want to sort on its

  • 0

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:

sort -t \t -k 2,2 in.txt > out.txt 

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

sort -t '\t' sort -t \'\t\' 

don’t work, neither does putting this in a cmd file with an actual tab in place of the \t above.

Edit: A solution using either the DOS shell or the Cygwin bash shell is fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:57:25+00:00Added an answer on May 10, 2026 at 11:57 pm

    On my machine (Mac bash prompt, GNU sort …) this works:

    sort -t '   ' -k 2,2 in.txt > out.txt 

    (A "real" tab between the quotes.)

    To get the tab there I type CTRL–V, TAB (CTRL–V followed by TAB).

    EDIT: I’ve now tested it on a Windows machine from the cygwin prompt and it works the same there (as I expected, bash is bash).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a huge tab-separated file formatted like this X column1 column2 column3 row1
I have got a huge tab-seperated file with up to 200 million rows (normally
I have huge data which is static. I need to save it within the
I've got a bad tab separated file that I need to clean up. The
I have some huge log files I need to sort. All entries have a
I have huge 3D arrays of numbers in my .NET application. I need to
I have huge number of Word files I need to merge (join) into one
I have huge amount of txt files which contains 64x64 matrices consisting of integers.
I have a huge file, where I have to insert certain characters at a
I have huge text file of such format: aaa bbb 1 aaa ccc 2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.