Sample Header Ad - 728x90

Filtering duplicates with AWK differing by timestamp

0 votes
4 answers
161 views
Given the list of files ordered by timestamp as shown below. I am seeking to retrieve the last occurrence of each file (the one at the bottom of each) For example: archive-daily/document-sell-report-2022-07-12-23-21-02.html archive-daily/document-sell-report-2022-07-13-23-15-34.html archive-daily/document-loan-report-2022-07-18-05-12-16.html archive-daily/document-loan-report-2022-07-18-17-07-26.html archive-daily/document-deb-report-2022-07-18-13-17-40.html archive-daily/document-deb-report-2022-07-18-10-04-21.html Would be something like: archive-daily/document-sell-report-2022-07-13-23-15-34.html archive-daily/document-loan-report-2022-07-18-17-07-26.html archive-daily/document-deb-report-2022-07-18-10-04-21.html Can I use awk or any other command to achieve this? Thanks in advance.
Asked by Luciano (3 rep)
Jul 18, 2022, 09:46 PM
Last activity: Feb 12, 2024, 10:01 AM