Grep can do multiple directories - just add "-r", as in:
grep -r <string> <top-level directory>
For example,
Code:
[humphdo1]:~ $ grep -r script tmp/
tmp/a.txt:-rwx------ 1 humphdo1 mkgroup_l_d 85 Jul 27 10:17 script
tmp/b.txt:-rwx------ 1 humphdo1 mkgroup_l_d 85 Jul 27 10:17 script
tmp/c.txt:-rwx------ 1 humphdo1 mkgroup_l_d 85 Jul 27 10:17 script
tmp/d.txt:-rwx------ 1 humphdo1 mkgroup_l_d 85 Jul 27 10:17 script
This searches every file in every directory within "tmp/" and tells me that four text files, [a-d].txt contain the word "script"
If you need multiple top-level directories, just write them in one after the other. It's smart enough to understand that.
Check "man grep" for more information on how to use the command.