On 30 Oct 1998 12:36:19 -0600, "Philip Campbell" <[EMAIL PROTECTED]> wrote:
>What follows is given into the public domain
>by the author, Philip Campbell, October 30, 1998.
>On my system, it's /usr/local/bin/number.diald.rules.
>
Or you could just use grep, sed:
egrep -v "^#|(^\ *$)" ` grep "^include.*filter" diald.conf | sed -e
"s/^include\ //g"` | grep -n ".*"
or a simpler perl script:
#!/usr/bin/perl
$show_all_lines = 1; # 0 to output only rules.
@ARGV=`grep '^include.*filter' diald.conf | sed -e 's/^include\ //g'`;
$rules=1;
while(<>) {
if (/^#|(^\s*$)/) {
printf(" %s", $_) if $show_all_lines==1;
} else {
printf("%3d %s", $rules++, $_);
}
}
Though your perl script may do things that the above hacks don't
-- Phelix
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]