Grep Search all files in directory for string1 AND string2

前端 未结 8 419
迷失自我
迷失自我 2020-12-31 02:22

How can I make use of grep in cygwin to find all files that contain BOTH words.

This is what I use to search all files in a directory recursively fo

相关标签:
8条回答
  • 2020-12-31 03:09
    grep -r db-connect.php . | grep version
    
    0 讨论(0)
  • 2020-12-31 03:11

    Why to stick to only grep:

    perl -lne 'print if(/db-connect.php/&/version/)' *
    
    0 讨论(0)
提交回复
热议问题