I'm trying to search for lines containing 'foo' but these lines must not contain 'bar'. What's a good way to search with these parameters with ack
?
I can do:
ack "foo" | grep -v "bar"
but it doesn't keep the nicely layed-out and coloured output of ack
. Also, grep
doesn't have good support for Perl regexes, unlike ack
.