Diff for /loncom/debugging_tools/dump_db.pl between versions 1.1 and 1.3

version 1.1, 2002/08/19 14:37:14 version 1.3, 2003/09/04 14:32:46
Line 35  use GDBM_File; Line 35  use GDBM_File;
   
 #  #
 # Options  # Options
 my $unesc = 0;  my ($unesc,$help,$localize_times) = (0,0,0);
 my $help = 0;  
 GetOptions("unescape" => \$unesc,  GetOptions("unescape" => \$unesc,
              "help"     => \$help);             "u"        => \$unesc,
              "t"        => \$localize_times,
              "help"     => \$help);
   
 #  #
 # Help them out if they ask for it  # Help them out if they ask for it
Line 51  database. Line 52  database.
 Options:  Options:
    --help     Display this help.     --help     Display this help.
    --unescape Unescape the keys and values before printing them out.     --unescape Unescape the keys and values before printing them out.
      -u        Same as --unescape
      -t        Localize times when possible (human readable times)
 Examples:   Examples: 
     dump_db.pl mydata.db      dump_db.pl mydata.db
     dump_db.pl mydata.db yourdata.db ourdata.db theirdata.db      dump_db.pl mydata.db yourdata.db ourdata.db theirdata.db
Line 72  while (my $fname = shift) { Line 75  while (my $fname = shift) {
             $key = &unescape($key);              $key = &unescape($key);
             $value = &unescape($value);              $value = &unescape($value);
         }          }
           if ($localize_times) {
               if ($value =~ /^\s*([0-9]{10,10})\s*$/) {
                   $value = $value.' [ '.localtime($1).' ]';
               }
           }
         print "$key = $value\n";          print "$key = $value\n";
     }      }
     untie %db;      untie %db;

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


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