Created
November 4, 2011 08:40
-
-
Save alexzhan/1338938 to your computer and use it in GitHub Desktop.
grep搜索同时包含多个关键字的文件
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -nirl ‘xxx’ ./ | xargs grep -Hnir “yyy” | |
命令的前半截先列举出包含’xxx’关键字的文件路径和文件名。后半句在这些文件中搜索’yyy’关键字并列出。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment