Question: If I have a text file called somefile that I want to sort, I can use the sort command, but if I want to sort
If I have a text file called "somefile" that I want to sort, I can use the sort command, but if I want to sort it by it's second column in reverse numerical order (highest to lowest number) I would need to issue the command...
a. sort -nrK2 somefile
b. uniq somefile | sort -r2 -Kn
c. sort -K2 -rn somefile
d. sort -K2 somefile (the numeric order is already highest to lowest!!!)
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
