diff options
Diffstat (limited to 'bin/keysearch.pl')
-rwxr-xr-x | bin/keysearch.pl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/keysearch.pl b/bin/keysearch.pl new file mode 100755 index 0000000..77ed255 --- /dev/null +++ b/bin/keysearch.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl +# +# display the input line(s) if all patterns match +# +use warnings; +use strict; + +my @patterns = @ARGV; + +my $pattern; + +LINE: while (<STDIN>) { + for $pattern (@patterns) { + next LINE unless m/$pattern/; + } + print; +} |