I am looking for a command options for grep to find files with the occurences of foo and bar.Grepping withgrep -r -e foo -e bar .shows files which have only foo or only bar and files which have foo and bar.Is it possible with grep to find only files which have both foo and bar (and display the lines that match either foo or bar or both in those files only)?Example:echo foo > file1echo bar > file2(echo foo;echo;echo bar) >file3echo barfoo > file4the grep cmd:grepcmd -r -e foo -e bar ../file3:foo./file3:bar./file4:barfoo
grepping foo and bar
grep;search