Perhaps the most powerful action available in find is -exec, which allows you to run a command on each of the found results. This is best explained by an example; this command looks for occurrences of the search string in all files with names ending in .vim in a directory named vim:
$ find vim -type f -name '*.vim' -exec grep -F search -- {} \;
The -exec action here is followed by the name of the grep tool, its -F option, a "search" pattern, an option terminator (--), and two special arguments:
- {}: Replaced with each find result
- \;: Terminates the command