Created
October 24, 2018 02:37
-
-
Save veapon/33b9b53efe690fb3a1ed9bee9e4d07e6 to your computer and use it in GitHub Desktop.
This file contains 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
tail -f log.log | grep --line-buffer -E "keywords" | |
grep 同时满足多个关键字和满足任意关键字 | |
① grep -E "word1|word2|word3" file.txt | |
满足任意条件(word1、word2和word3之一)将匹配。 | |
② grep word1 file.txt | grep word2 |grep word3 | |
必须同时满足三个条件(word1、word2和word3)才匹配 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment