@darius For more complexity, I usually combine find and xargs with grep:

find . -iname "*.txt" -print0 | xargs -0 grep -5 "foo"

with params, you can use "find" to include/exclude files/directories (e.g. ignore ".git", or softlinks) recursively.

"-print0 | xargs 0" turns all filenames into NULL terminated strings parameters, letting you search filenames with embedded spaces.

Yeah, with power comes complexity. 🙂