sorry the previous solution is wrong. it just proves one thing: for every complex problem there is a solution that is simple, neat and wrong. ;-) here's the correct one, hopefully grep -l aaa `grep -l bbb files-to-grep`
【在 R**a 的大作中提到】 : what if one wants the output to be a list of file names, such as what you get : when using grep -l.