This shell construct is in general very useful. For instance, to edit every file in a directory tree containing the string "foo":
vi `grep -r -l foo .`