grep
能否在出现单词列表中的至少一个元素时选择行?例如
grep "hello world" file1
grep
必须给我所有包含单词 hello
或单词 world
或两者的行。
最佳答案
grep "hello\|world" file1
关于linux - 使用 grep 选择与列表中的任何单词匹配的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2955783/