We cannot perform sorting on columns using sort command.

Answer: b
Explanation: We can also specify a character position within a field to the beginning of sort. For example, if we have to sort salary field then we can specify in the form -k m,n where n is the character position in mth field.
Code:
$ sort -t “|”  -k  6.1,6.2 shortlist        // sort according to the first two digits of salary.
// here salary is the 6th field.
 

Tìm kiếm

Back
Top