diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2010-10-04 13:35:54 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2010-10-04 13:35:54 +0000 |
commit | c6ba6dca3b7cc983ffe4ef27d0836a71a5449c1a (patch) | |
tree | ce82a468015ded61de392ce7854d3fa09ce844e7 | |
parent | ce43572939d8cf412c8d5bbc36a79197b22f57d5 (diff) |
Bedre utskrift.
-rwxr-xr-x | frikanalen/bin/frikanalen-tonostats | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/frikanalen/bin/frikanalen-tonostats b/frikanalen/bin/frikanalen-tonostats index 08452f5..c41243b 100755 --- a/frikanalen/bin/frikanalen-tonostats +++ b/frikanalen/bin/frikanalen-tonostats @@ -56,11 +56,12 @@ sub print_tono_stats { printf("Innslag med tono-musikk: %d (%.1f%%)\n", $with, 100 * $with / ($with+$without)); printf("Innslag uten tono-musikk: %d (%.1f%%)\n",$without, 100 *$without/($with+$without)); + print "Andel\tmed\tuten\tnavn\n"; for my $org (sort tonoorder keys %orgs) { my $tono = $orgs{$org}{tono} || 0; my $notono = $orgs{$org}{notono} || 0; - my $frac = int(100 * $tono / ($tono+$notono)); - print "$frac\t$tono\t$notono\t$org\n"; + my $frac = 100 * $tono / $with; + printf "%4.1f\t%d\t%d\t%s\n", $frac, $tono, $notono, $org; print join(" ", " ", @{$orgs{$org}{tonoids}}), "\n" if $opts{'i'} && exists $orgs{$org}{tonoids}; } |