How do I pass the resulting files from one grep pass to another so that I only grep through the subset with the second pass?
I want to be able to take the files I found with my first grep statement, something like this for example: grep -r Makefile * And then pass the files found in that pass of grep to a second grep with something like this for example: gre开发者_JS百科p {files} '-lfoo'
How do I do this? I know there must be a way.
Thank you.
grep -l firstmatch * | xargs grep secondmatch {}
精彩评论