1. grep -E "word1|word2|word3" file.txt
满足任意条件(word1、word2和word3之一)将匹配。
2. grep word1 file.txt | grep word2 |grep word3
必须同时满足三个条件(word1、word2和word3)才匹配。
标签:grep,file,关键字,满足,word1,word3,word2,txt
来源: https://blog.csdn.net/whatday/article/details/104819708