awk question

Trying to parse data with three columns. The 2nd and 3rd columns are not constant and there is a data stamp. Tried a few iterations of awk but can't seem to get the desired output.

This is the format:

entry1 2017-12-12 some_text
entry1 2017-12-13 some_text
entry1 2017-12-18 some_text
entry2 2017-12-10 some_text
entry3 2017-12-08 some_text
entry3 2017-12-04 some_text

This is the desired output (trying to get one entry with the latest date):

entry1 2017-12-18 some_text
entry2 2017-12-10 some_text
entry3 2017-12-08 some_text

Any help is appreciated.

For unsorted date input, try:-

sort -k2.1,2.5 -k2.6,2.8 -k2.9,2.11 file | awk 'p&&p!=$1{print v}{p=$1;v=$0}END{print v}'

thank you Yoda, I've never used multiple instances of sort. Happy new year Cheers!

Hmmm - those are not multiple instances of sort but just three sort key definitions - which are not needed, or even can spoil the result. Try simply

sort file | awk 'p&&p!=$1{print v}{p=$1;v=$0}END{print v}'