mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-12-23 13:56:47 +02:00
19 lines
262 B
Plaintext
19 lines
262 B
Plaintext
|
#!/usr/bin/perl
|
||
|
$key = shift @ARGV;
|
||
|
$skip = 0;
|
||
|
$skipping = 0;
|
||
|
while (<>) {
|
||
|
if (/^#/ && $. != 1) {
|
||
|
$skip = $_ !~ /$key/;
|
||
|
print unless $skip;
|
||
|
next;
|
||
|
}
|
||
|
if (/^\s/) {
|
||
|
print unless $skipping;
|
||
|
next;
|
||
|
}
|
||
|
print unless $skip;
|
||
|
$skipping = $skip;
|
||
|
$skip = 0;
|
||
|
}
|