sort -t, -k2,2nr scores.csv

Category: Administration

sort -t, -k2,2nr scores.csv

Sort a CSV by a numeric column

The -t, flag sets the field delimiter to a comma, and -k2,2nr sorts by field 2 with n for numeric and r for reverse order. The start,end key range form -k2,2 pins the sort to exactly one field. Extend the range like -k2,3 to break ties with a second column.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.