Hi Friends,
I have a list of files in a directory as shown below. It is basically in this format-> yymmdd.hhmmss.filename.out
I want to list the latest log of each file. ie. the lastest a.out, b.out, c.out, which means I am looking for only the below 3 files out of these 5 files:
All I can think of is have the file names, a.out, b.out, c.out in a input file and have a for loop. The loop would grep for the file name and take the latest one; it is something like,
I want to know if we have any other smarter way of doing this without using any loops as the number of files to scan are more.