mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-22 20:59:22 +02:00
18 lines
242 B
Plaintext
18 lines
242 B
Plaintext
|
#!/usr/bin/perl
|
||
|
$on = 1;
|
||
|
while (<STDIN>) {
|
||
|
$line = $_;
|
||
|
if (/^#%id=/) {
|
||
|
chop($id = $');
|
||
|
$on = 1;
|
||
|
for (@ARGV) {
|
||
|
if ($_ =~ /^!/) {
|
||
|
$on = 0 if $id =~ $';
|
||
|
} else {
|
||
|
$on = 0 unless $id =~ $_;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
print $line if $on;
|
||
|
}
|