Hello All,
I would like to display files that contain more than one expression and exclude files that do not have all expressions.
Any ideas?
Thanks!
Hello All,
I would like to display files that contain more than one expression and exclude files that do not have all expressions.
Any ideas?
Thanks!
if you don't have the -r you can just use grep over again on the results grep expression1 * | grep expression 2 | grep expression 3
Usually I do that sort of thing by running grep multiple times, something like
grep -l 'expression1' * | xargs grep -l 'expression2' | xargs grep -l 'expression3'
and so on. It doesn't seem very efficient, and I wouldn't be surprised if there is a better way, but I don't know it.