I'm trying to understand an existing script used in our project with the sort command
sort -t= -nr -k3 nos
nos is a file with whitespace and numbers, for this example:
997 998 999 1000
The output is
999 998 997 1000
What I don't understand is why 1000 appears last. I suspect it is because of the argument
-k3 when there is only key for each entry but I can't find anything in the documentation to say how it behaves when the specified key position doesn't exist.
Up until 4-digit numbers were included in the file this gave the expected result of sorting the numbers descending numerically.