$month = $month2num{$month};
if($daynum < 10) { $daynum = "0".$daynum; }
$date="$month-$daynum-$year";
- if(!defined $dates{$date}) { $header .= $date . " "; }
- $dates{$date} = 1;
+ if(!defined $founddates{$date}) { $header .= $date . " "; }
+ $founddates{$date} = 1;
}
if(($in_totals == 1) && ($line =~ /^\s+$/)) {
$in_totals = 0;
if($date !~ /(\d+)-(\d+)-(\d+)/) { next; }
$date_data=adjust_data($totals{$filesystem}{$date}{data});
$data .= sprintf("%10s",$date_data). " ";
+ $date_totals{$date}{data} += $totals{$filesystem}{$date}{data};
}
$data_total=adjust_data($data_total);
$total_delta+=$totals{$filesystem}{delta};
$delta=adjust_data($totals{$filesystem}{delta});
printf("%-${maxlen}s %s %10s\n",$filesystem,$data,$delta);
}
+ $data="";
$data_len=length($data);
$total_delta=adjust_data($total_delta);
- printf("%-${maxlen}s %-${data_len}s %10s\n","Totals:","",$total_delta);
+ foreach $date (sort keys %date_totals) {
+ $date_data=adjust_data($date_totals{$date}{data});
+ $data .= sprintf("%10s",$date_data). " ";
+ }
+ printf("%-${maxlen}s %-${data_len}s %10s\n","Totals:",$data,$total_delta);
}
#########