我正在尝试使用grep和-v进行反向匹配,并使用-e进行正则表达式.我无法正确使用语法.
我正在尝试类似的东西
tail -f logFile | grep -ve "string one|string two"
Run Code Online (Sandbox Code Playgroud)
如果我这样做它不会过滤如果我将其更改为
tail -f logFile | grep -ev "string one|string two"
Run Code Online (Sandbox Code Playgroud)
我明白了
grep: string one|string two: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我尝试使用()或引号,但一直无法找到有效的东西.
我怎样才能做到这一点?
grep ×1