Latest Log Retrieval

We have logs stored in the following format and there will be potentially loads of them in the folder we are looking.

What’s the best and least impactful way to get lines of file from a file with this syntax.

I also only want to retrieve the data from the latest ones in an Analysis

/location/log_$(hostname)_$(date +%d).out

You can try something below & modify accordingly:

lines of files whose (modification time of it = maximum of modification times of files whose (name of it as lowercase ends with ".out" AND name of it contains (computer name) AND name of it starts with "/location") of folder "/var") of folder "/var"