How do I sort a column in Linux?

How do I sort a column in Linux?
Answer
Sorting by a Single Column
Sorting by single column requires the use of
the -k option
. You must also specify the start column and end column to sort by. When sorting by a single column, these numbers will be the same. Here is an example of sorting a CSV (comma delimited) file by the second column.
 

Tìm kiếm

Back
Top