Issue
I'm trying to sort a file by second column, but in reverse order. I tried:
sort -k2n -r file.txt
The output is not in reverse order, so it seems -r is being ignored. I'm in CentOS.
Solution
I just needed to remove the "n" next to column number:
sort -k 2 -r file.txt
Answered By - Oscar Miranda Answer Checked By - Pedro (WPSolving Volunteer)