【发布时间】:2012-11-18 12:23:28
【问题描述】:
Linux内核源码config/*里面有很多文件我想找一个和我的板子差不多的。
所以我试试:
egrep -l -e key1 -e key2 config/*
Sample config/file1:
This is key1
This is key2
Sample config/file2:
This is key1
Sample config/file3:
This is key2
但结果是key1 或key2 文件列表。
我想要包含key1 和 key2的结果
还是有其他简单的 unix shell 可以生成结果?
在之前的示例中,我只想列出“file1”。
【问题讨论】:
-
也许这个链接可以帮助你:linux.byexamples.com/archives/290/…