Take only lastest file matching the pattern

Hi All ,

I have some fille names in a file which are sorted according to date. for example

 
 file1_123.log  23 Jul 0Kb
 file2_123.log  22 Jul 2Kb
 file3_123.log  20 Jul 0Kb
 file1_456.log  24 Jul 2Kb
 file2_678.log  22 Jul 0Kb
 file2_678.log  21 Jul 2Kb
 

here 123 is a particular Order No. I want to pick only the latest files for a particular order no.

My final output should be

 
 file1_123.log  23 Jul 0
file1_456.log  24 Jul 2
 file2_678.log  22 Jul 0

 

I have tried sorted the file into a file but I am having no idea on how to proceed from here. any code sample will be very much appreciated.

OS - AIX

awk -F'[_|.]' '!a[$2]++' file

Thanks all