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

  • SEARCH
  • Home
  • 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 9048353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:08:13+00:00 2026-06-16T12:08:13+00:00

today I found a question in sorting a file with linux sort command. When

  • 0

today I found a question in sorting a file with linux sort command. When I set the env LANG=En_US, the result is what I expect. But when LANG=en_US, the result is strange.
Some commands I ran and the output as follows:

[work@xx:/data1/muce_temp/datamarts/reduce_result_file/302/1d/201212260000]$ cat dd.dat                 
23 340_guard    16                                                                                                        
23 340_guard    17                                                                                                        
23 340_guard    18                                                                                                        
23 360_guard... 16                                                                                                      
23 360_guard    16                                                                                                        
23 360_guard... 17                                                                                                      
23 360_guard... 18              

[work@xx:/data1/muce_temp/datamarts/reduce_result_file/302/1d/201212260000]$ LANG=En_US sort dd.dat     
23 340_guard    16                                                                                                        
23 340_guard    17                                                                                                        
23 340_guard    18                                                                                                        
23 360_guard    16                                                                                                        
23 360_guard... 16                                                                                                      
23 360_guard... 17                                                                                                      
23 360_guard... 18                                 

[work@xx:/data1/muce_temp/datamarts/reduce_result_file/302/1d/201212260000]$ LANG=en_US sort dd.dat     
23 340_guard    16                                                                                                        
23 340_guard    17                                                                                                        
23 340_guard    18                                                                                                        
23 360_guard... 16                                                                                                      
23 360_guard    16          (why this line appear here ? )                                                                                      
23 360_guard... 17                                                                                                      
23 360_guard... 18      

the format details of rows in this file likes:

2^E3^F360_guard^E...^I16^Ee^E17/18^I63776769$
2^E3^F360_guard^E^I16^Ee^E17/18^I63776769$
2^E3^F360_guard^E...^I17^Ei^E0^I63776771$
2^E3^F360_guard^E...^I18^Ei^E1^I63776773$

^E is ‘\x05’ , ^F is ‘\x06’, ^I is tab, $ is ‘\n’ .

Thanks in advance.

  • 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. Editorial Team
    Editorial Team
    2026-06-16T12:08:14+00:00Added an answer on June 16, 2026 at 12:08 pm

    The locale en_US invokes a smarter sorting algorithm that ignores those strings of dots like they would normally be ignored in manual sorting. The locale system is obviously being case-sensitive, and there is no En_US locale, so En_US is falling back to the default language (probably C).

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

Sidebar

Related Questions

I was looking at a css file today and found the following rule set:
A friend asked me a question today about an assignment problem. I found a
I encountered a question today, found here , which raised this question for me.
Today I found a very mysterious bug in the code. I have used the
Today I found LiquiBase project and I think it is very interesting. I would
Today I found the following: #include <stdio.h> int main(){ char x = 255; int
Today I found that my site was down...I turned the errors to off and
While searching a bug in my code today I found a strange thing. When
I was playing around with include and extend today and found something I don't
I come across the google project http://www.20thingsilearned.com/ today and I found the canvas-based page

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.