sort -nk3r
will sort in reverse order based on the third column. Note, however, that this outputs
2 1 5 7
1 2 3 4
3 4 2 9
10
11
2 7
3
4 6
8 9
because of the bash sorting way, and this results in a different result than the result you posted, but correct according to the question.
source
to share