I have a bunch of files, I'd like to find the last match of a string in each of them.
grep text *.file gives me all the matches not the last ones.
ls *.file | xargs grep text | tail -n 1 gives me the last line of the last file that matches.
So what I think I want is a way to say:
ls *.file | (xargs grep text | tail -n 1)
But I'm not sure how to do this, or if it's possible.