Contents
-k Option: Unix provides the feature of sorting a table on the basis of any column number by using -k option. Use the -k option to sort on a certain column. For example, use “-k 2” to sort on the second column.
How do you sort a specific field?
To sort a range:
- Select the cell range you want to sort. …
- Select the Data tab on the Ribbon, then click the Sort command.
- The Sort dialog box will appear. …
- Decide the sorting order (either ascending or descending). …
- Once you’re satisfied with your selection, click OK.
- The cell range will be sorted by the selected column.
How does Linux sort work?
In computing, sort is a standard command line program of Unix and Unix-like operating systems, that prints the lines of its input or concatenation of all files listed in its argument list in sorted order. Sorting is done based on one or more sort keys extracted from each line of input.