dsdb: Explain ordering constraints on the ACL module as well.
[Samba/gebeck_regimport.git] / examples / printer-accounting / acct-sum
blobffbfc8d8801f4459555d68f6ca6690d60884bad0
1 #!/usr/bin/perl
3 while (<>) {
4 ($date, $user, $machine, $size, $pages) = split(' ');
6 $Printer{$ARGV}++;
7 $PrinterPages{$ARGV} += $pages;
9 $Jobs{$user}++;
10 $Size{$user}+= $size;
11 $Pages{$user}+= $pages;
14 printf "%-15s %5s %8s %8s\n", qw(User Jobs Pages Size);
15 foreach $user (sort keys %Jobs) {
16 printf "%-15s %5d %8d %8d \KB\n",
17 $user, $Jobs{$user}, $Pages{$user}, $Size{$user}/1024;
21 print "\n\n";
22 printf "%-15s %5s %8s %8s\n", qw(Printer Jobs Pages);
23 foreach $prn (sort keys %Printer) {
24 ($name = $prn) =~ s=.*/==;
25 printf "%-15s %5d %8d\n",
26 $name, $Printer{$prn}, $PrinterPages{$prn};