I have a directory full of log files that I need to search through, and I am only interested in the last match in the file. I know I can only match n number of lines ( in my case, 1 ), but I'd like to begin matching from the end of the file, not the start of it.
I can't use tail or any other utility to feed files in to grep either, I need to retain the filename in the output.
Kind of a strange request, anybody have any advice on this?
I can't use tail or any other utility to feed files in to grep either, I need to retain the filename in the output.
Kind of a strange request, anybody have any advice on this?