improved status msg
authorShawn Boyette <sboyette@esilibrary.com>
Fri, 26 Sep 2008 17:07:40 +0000 (17:07 +0000)
committerShawn Boyette <sboyette@esilibrary.com>
Fri, 26 Sep 2008 17:07:40 +0000 (17:07 +0000)
renumber_marc

index 3f6f93a..fe2bfa7 100755 (executable)
@@ -8,6 +8,8 @@ use Getopt::Long;
 use MARC::File::XML ( BinaryEncoding => 'utf-8' );
 #use MARC::Field;
 
+$| = 1;
+
 my $count = 0;
 my $conf  = {}; # configuration hashref
 initialize($conf);
@@ -38,8 +40,9 @@ foreach my $input ( @ARGV ) {
                                              $conf->{subfield} => $new_id );
         $record->append_fields($new_id_field);
         print RENUMBER $record->as_xml;
+        print STDERR "\rLast record: $count";
     }
-    print STDERR "Processed $count records.  Last record id at ",
+    print STDERR "\rProcessed $count records.  Last record id at ",
       ($conf->{'renumber-from'} + $count - 1), "\n";
 }