diff --git a/quotacheck/quotagraph b/quotacheck/quotagraph index 49d9d9d..3f432a8 100755 --- a/quotacheck/quotagraph +++ b/quotacheck/quotagraph @@ -29,16 +29,15 @@ while(<>) { } print "$date $time\n"; - $ld = {}; + $ld = []; push(@data, [ $time, $ld ]); $lastdate = $date; } - $ld->{$user . $fs} = $bused if ($opts{"data"} eq "bused"); - $ld->{$user . $fs} = $bsoft if ($opts{"data"} eq "bsoft"); - $ld->{$user . $fs} = $bhard if ($opts{"data"} eq "bhard"); - $ld->{$user . $fs} = $iused if ($opts{"data"} eq "iused"); - $ld->{$user . $fs} = $isoft if ($opts{"data"} eq "isoft"); - $ld->{$user . $fs} = $ihard if ($opts{"data"} eq "ihard"); + if ($data eq "b") { + $ld = [ $bused, $bsoft, $bhard ]; + } else { + ... + } } } @@ -51,8 +50,8 @@ for (my $i = 0; $i <= $#data; $i++) { my $data = ($data[$i])->[1]; print DATA $time; - for $j (@top) { - print DATA "\t", $data->{$j} + 0; + for $j (@$data) { + print DATA "\t", $j + 0; } print DATA "\n"; }