Search Results

Search: Posts Made By: maq
2,856
Posted By gaurab
-k1,1 tells sort that: first sort the file...
-k1,1 tells sort that: first sort the file alphabetically using column 1 as the key. (1,1) means only use the first column.
The option just "-k1" would mean use the whole line as key starting with...
2,856
Posted By cjcox
Unix/Linux sort can handle fields. Older use...
Unix/Linux sort can handle fields. Older use +FIELD<type> -FIELD... so
sort +0 -1 +1n -2

newer sort support the -k option and field positions start at 1 instead of 0.
sort -k1,1 -k2,2n
Showing results 1 to 2 of 2

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