У меня есть входной файл, как показано ниже, input.txt
companyname,emailid,extenno,lastupdatedgmts
Dell,jcrshan@gmail.com,985553434,2018-06-13 23:30:52.12
Dell,jcrshan@gmail.com,85553434,2018-06-14 23:30:52.12
IBM,ramesh@gmail.com,785553434,2018-06-15 23:30:52.12
UTO,benny@gmail.com,785553434,2018-06-16 23:30:52.12
Я бы хотел выполнить следующие действия над входным файлом, указанным выше,
1. sort the above file using emailed (second column) with ascending and lastupdatedgmts (fourth column) with descending
2.remove duplicate based on emailid (second column)
ожидаемый результат:
UTO,benny@gmail.com,785553434,2018-06-16 23:30:52.12
Dell,jcrshan@gmail.com,985553434,2018-06-14 23:30:52.12
IBM,ramesh@gmail.com,785553434,2018-06-15 23:30:52.12
Не могли бы вы помочь?