2 ms·
Perl would be one option: perl -ne '( /foo/ and /bar/ and !/baz/ and !/splat/ ) and print "$ARGV: $_"' * I didn't include the context part, since that would
by tyingq 5y ago
Perl would be one option:
perl -ne '( /foo/ and /bar/ and !/baz/ and !/splat/ ) and print "$ARGV: $_"' *
I didn't include the context part, since that would be more than a one-liner, but it's not hard to do in a short script.