I have a file in the following format
222 aaaaa 2021-12-24
333fd bbb 2021-09-1
444 cc 2022-01-16
555 zzz 2021-08-21
6666 www 2021-09-5
777 yyy 2021-03-14
888 xxx 2021-11-27
999 ffffff 2021-12-4
I am trying to order the file based on the date column.
I have tried to sort :
- with option
-t "-" -k2delimiter but doesn't work. (tried to order by month at least) - with option
-k3.4(it can order by the 4th char of the year 2021/2022), piping with| sort -n -k3.5but doesn't work