coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

question on using the -n option for sorting


From: American Citizen
Subject: question on using the -n option for sorting
Date: Sat, 2 Nov 2024 18:48:21 -0700
User-agent: Mozilla Thunderbird

Hello:

I am a number theory mathematician, using linux as a computer platform for my studies.

In using the sort command with the -n option, such as the command

%sort -k3,3n close.2 > close.3

I noticed that the 93 digits in the 3rd field are NOT numerically ordered, although most were.

I switched to the dictionary order

%sort -k3,3 close.2 > close.3

and then close.3 seems to be in the correct numerical sequence in field 3.

Can anyone share with me how many digits the -n option can safely sort? Can we do decimals > 17 digits with this option? Can sort be strengthened to handle digits > 17 ?

Thank you for letting me know. I attach a short 100 line sample file which was extracted from the 29,984 line actual close.2 file.

Randall

Attachment: example.sort
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]