Root/labsw/mech/filter

Source at commit 51106cf9b34d773e72aa00385c80a9abb76b28df created 6 years 7 months ago.
By Werner Almesberger, ircstat/ML: update for 11/2013
1#!/usr/bin/perl
2$on = 1;
3while (<STDIN>) {
4    $line = $_;
5    if (/^#%id=/) {
6        chop($id = $');
7        $on = 1;
8        for (@ARGV) {
9            if ($_ =~ /^!/) {
10                $on = 0 if $id =~ $';
11            } else {
12                $on = 0 unless $id =~ $_;
13            }
14        }
15    }
16    print $line if $on;
17}
18

Archive Download this file

Branches:
master



interactive