[plug] grep regex on command line with pipe?
Lucas van Staden
lvs at dedmeet.com
Thu Sep 10 15:33:20 WST 2009
Hi,
Wonder if someone could clarify if this is possible.
Do a regex match on the command line, using grep, but using the pipe to
match 'regex or'?
(in my instance I am doing an invert grep match, so example has the -v)
example
I want to grep a file but ignore all lines with 'foo' and 'bar'
Obvious way is :
grep -v foo file | grep -v bar
I was just wondering if that could be done using only one grep with regex
grep -v --regex=foo|bar settings.json
, but the pipe is handled as a file pipe...
Tried this way and that, same result.
Not found any immediate answer with some quick googling
Just curious, am I missing something obvious?
-Lucas
More information about the plug
mailing list