Root/labsw/mech/filter

Source at commit a27d1958fb3a238dcdc9fe15e0d0649448409129 created 10 years 2 months ago.
By Werner Almesberger, ircstat/ML: update for 12/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