0

Unix file Sort rows on the basis of timestamp column

A 00:00:01
K 01:02:00
C 01:02:03
N 01:03:02

Excepted output should be sort basis on last column HH:MM:SS

N 01:03:02
C 01:02:03
K 01:02:00
A 00:00:01

I tried command sort -k 4 -t " " -n -r txt. But this not giving expected result.

1 Answers1

2
sort -k 2 -r txt

should be enough

KamilCuk
  • 120,984
  • 8
  • 59
  • 111