I'm interested in sorting a text file that has entries with the First name and Last name in that order
[Ex]
John Doe
I'm interested in sorting the list by LAST name only. Is this a job for sed or awk? Can I modify the sort
command to sort by the second word or LAST name only?
Simply
-k
specify the sort key; by default the field number where field are separated by blanks.From
man sort
:Example: