mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-15 12:19:42 +02:00
20 lines
292 B
Perl
Executable File
20 lines
292 B
Perl
Executable File
#!/usr/bin/perl
|
|
$sel = $ARGV[0];
|
|
shift @ARGV;
|
|
for (@ARGV) {
|
|
$s = 0;
|
|
$n = 0;
|
|
open(FILE, $_) || die "$_: $!";
|
|
while (<FILE>) {
|
|
$c = 0 if /<TR>/;
|
|
if (/<TD[^>]*>([0-9.]+)/ ) {
|
|
$c++;
|
|
next unless $c == $sel;
|
|
$s += $1;
|
|
$n++;
|
|
}
|
|
}
|
|
close FILE;
|
|
print "$s/$n = ", $s/$n, "\n";
|
|
}
|