System: AIX 7.1
Let's say I have a folder with files like these:
The files I need always have this prefix sapemea_postatus.log.xxxxxxxx, and inside of them we always have a number (collection number), like this:
And I always have questions like
Hey, which collection number is the last one we have?
So I always have to open the FTP, navigate to the folder, filter the column to show the newest ones in the top, look for the latest sapemea_postatus.log file, download it and check with notepad++.
So my question is: Is there a way to make grep command where I can filter for those kind of files, get the most recent one, and show this collection number? Thanks!