going too fast, forgot to actually tell it to print records to output file :(
authorShawn Boyette <sboyette@esilibrary.com>
Thu, 28 Aug 2008 19:03:39 +0000 (19:03 +0000)
committerShawn Boyette <sboyette@esilibrary.com>
Thu, 28 Aug 2008 19:03:39 +0000 (19:03 +0000)
renumber_marc

index 2b1b23a..188b27d 100755 (executable)
@@ -12,9 +12,11 @@ my $count = 0;
 my $conf  = {}; # configuration hashref
 initialize($conf);
 
-binmode(STDOUT, ':utf8');
 binmode(STDIN, ':utf8');
 
+open RENUMBER, '>', $conf->{output};
+binmode(RENUMBER, ':utf8');
+
 foreach my $input ( @ARGV ) {
     print STDERR "Processing $input, starting record id at ",
       $conf->{'renumber-from'},"\n";
@@ -35,7 +37,7 @@ foreach my $input ( @ARGV ) {
                                              ' ',
                                              $conf->{subfield} => $new_id );
         $record->append_fields($new_id_field);
-        print $record->as_xml;
+        print RENUMBER $record->as_xml;
     }
     print STDERR "Processed $count records.  Last record id at ",
       ($conf->{'renumber-from'} + $count - 1), "\n";