Chained matching

Sometimes you want to find references to “foo bar” or things like that, but regex won’t cut it. Maybe “foo” is on a different line from “bar”. It can get a little hairy when you want to chain that together even further.

grep -ilR 'foo' * | xargs grep -il 'bar' | etc...

Leave a Reply