Is there a way for the find command to search for the first match or occurrence of a string or pattern within each of multiple files? I've been using the usual syntax:
find dir -iname '*.ext' -exec command 'pattern' {} \;
Keep in mind this is not same as the commonly-asked problem of producing the first result from a search using find with
-quit
or
head -n 1
.