I'm working in a large codebase and want to see where particular strings like "foo" and "bar" are used, within n lines of each other, in any file in that codebase.
Ideally I'd use a built-in Unix command, but a Python script would be ok too. (Perl or Ruby would not be great).