file: nameslist.txt
Emily 0
Emily 1
Emily 5
Joe 0
Joe 10
Joe 5
Joe 6
This is the command I ran:
cat nameslist.txt | sort -k1 -k2
The result:
Emily 0
Emily 1
Emily 5
Joe 0
Joe 10
Joe 5
Joe 6
It looks like it's sorting by the first number, but how can I get the second column to sort numerically? The result I want is:
Emily 0
Emily 1
Emily 5
Joe 0
Joe 5
Joe 6
Joe 10