#!/usr/athena/bin/perl

open (FI, "$ARGV[0]");

while (<FI>) {
	if(/\d+:/) {
		($hour, $amount) = split;
		$tots[$hour] = $tots[$hour] + $amount;
		print"$amount.";
		$gtot = $gtot + $amount;
		if($amount > $max){ $max = $amount;}
}
}
$scale = 40/$max;
print "\n\n\n";
foreach $h (0..23) {
	print"$h";
	$long = $tots[$h] * $scale;
	$length = int $long;
	print "-" x $length;
	print "\n";
}
