Diff for /doc/loncapafiles/accesscount_seed.piml between versions 1.1 and 1.5

version 1.1, 2003/12/09 20:17:48 version 1.5, 2005/06/02 23:31:11
Line 41  print "\nUpdating access count storage. Line 41  print "\nUpdating access count storage.
 my $logfile = '/tmp/accesscount_update_log.txt';  my $logfile = '/tmp/accesscount_update_log.txt';
   
 # get a list of all user directories  # get a list of all user directories
   print "Getting directory listing.\n";
 my @dirs=`find <TARGET /> -type d `;  my @dirs=`find <TARGET /> -type d `;
 my @userdirs=grep(m|/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*|, @dirs);  my @userdirs=grep(m|/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*|, @dirs);
   
 my $count = 0;  my $count = 0;
 my $countby = 20;  my $countby = 1;
 print "Updating ".scalar(@userdirs)." files.  Each '.' represents ".$countby.  # print "Updating ".scalar(@userdirs)." files.\n";
       " files processed.\n";  print "Updating ".scalar(@userdirs)." files.";
   my $char_count = 0;
 foreach my $udir (@userdirs) {  foreach my $udir (@userdirs) {
     if (++$count % $countby == 0) {      if (++$count % $countby == 0) {
         print ".";   print ("\b" x $char_count);
           print $count."/".scalar(@userdirs);
           $char_count = length($count."/".scalar(@userdirs));
     }      }
     chomp($udir);      chomp($udir);
     my $file = $udir.'/nohist_resevaldata.db';      my $file = $udir.'/nohist_resevaldata.db';
     next if (! -e $file);      next if (! -e $file);
       next if (-e $udir.'/nohist_accesscount.db');
     system('/home/httpd/perl/seed_accesscount.pl '.$file.      system('/home/httpd/perl/seed_accesscount.pl '.$file.
                 ' 2>>'.$logfile);                  ' 2>>'.$logfile);
 }  }

Removed from v.1.1  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>