Search Results

Search: Posts Made By: cokedude
33,858
Posted By cokedude
Yes. $ sort -t, -k2,2n medium.txt 58,1 ...
Yes.

$ sort -t, -k2,2n medium.txt
58,1
30,2
39,3
57,3
72,3
61,5
7,5
85,6
23,7
71,7
21,9
19,10
0,11
20,11
38,11
14,13
54,13
33,858
Posted By cokedude
Ok here it is not sorting properly. 14 and...
Ok here it is not sorting properly. 14 and several other numbers should not be as low as they are.

$ sort -n -k 1,1 medium.txt
0,11
7,5
21,9
23,7
30,2
39,3
57,3
58,1
61,5
71,7
72,3...
33,858
Posted By cokedude
Sort by second column numeric values
From googling and reading man pages I figured out this sorts the first column by numeric values.

sort -g -k 1,1

Why does the -n option not work? The man pages were a bit confusing.

And...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 12:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy