diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-06-24 21:33:33 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-06-24 21:33:33 +0200 |
commit | 193c8763447a9ecad4f8ae8d53d82e1e1ca049b3 (patch) | |
tree | 938a3b6659c6427f366d70f424689bd94b682a97 /mpgrep | |
parent | 0fa1debfd6857edf7298a2478d7c877b29645ff3 (diff) | |
download | bin-193c8763447a9ecad4f8ae8d53d82e1e1ca049b3.tar.gz bin-193c8763447a9ecad4f8ae8d53d82e1e1ca049b3.tar.xz |
add mpgrep
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'mpgrep')
-rwxr-xr-x | mpgrep | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,14 @@ +#!/usr/bin/perl +use warnings; +use strict; + +my @patterns = @ARGV; + +my $pattern; + +LINE: while (<STDIN>) { + for $pattern (@patterns) { + next LINE unless m/$pattern/; + } + print; +} |