Skip to main content
added 46 characters in body
Source Link
garethTheRed
  • 35k
  • 4
  • 101
  • 106

Try:

sort -t "_" -k2 -k3 -g <filename>

-t "_" - field seperator is _

-k2 - 1st sort on the second column

-k3 - then sort on the third column

-g - general numerical sort

Try:

sort -t "_" -k3 -g <filename>

-t "_" - field seperator is _

-k3 - sort on the third column

-g - general numerical sort

Try:

sort -t "_" -k2 -k3 -g <filename>

-t "_" - field seperator is _

-k2 - 1st sort on the second column

-k3 - then sort on the third column

-g - general numerical sort

Source Link
garethTheRed
  • 35k
  • 4
  • 101
  • 106

Try:

sort -t "_" -k3 -g <filename>

-t "_" - field seperator is _

-k3 - sort on the third column

-g - general numerical sort