How can I sort time records chronologically?
Given that a file contains:
10:30a ...
08:30a ...
11:00p ...
09:15a ...
01:30p ...
...
how do I make them into the ff. (arranged chronologically)? I've tried the sort -n command, but obviously it just looks at the time itself and not the "a" or "p" mark and sorts the record according to the numbers.
Thank you!
Given that a file contains:
10:30a ...
08:30a ...
11:00p ...
09:15a ...
01:30p ...
...
how do I make them into the ff. (arranged chronologically)? I've tried the sort -n command, but obviously it just looks at the time itself and not the "a" or "p" mark and sorts the record according to the numbers.
Thank you!