[open-ils-commits] r374 - conifer/trunk/tools/migration-scripts (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 21 00:51:22 EDT 2009
Author: dbs
Date: 2009-04-21 00:51:19 -0400 (Tue, 21 Apr 2009)
New Revision: 374
Modified:
conifer/trunk/tools/migration-scripts/fix_bad_marcxml.pl
Log:
Extra escaping for the replacement value
Modified: conifer/trunk/tools/migration-scripts/fix_bad_marcxml.pl
===================================================================
--- conifer/trunk/tools/migration-scripts/fix_bad_marcxml.pl 2009-04-21 04:24:21 UTC (rev 373)
+++ conifer/trunk/tools/migration-scripts/fix_bad_marcxml.pl 2009-04-21 04:51:19 UTC (rev 374)
@@ -42,9 +42,10 @@
} elsif ($_ =~ m#<subfield code="&">#o) {
print STDERR "Bad subfield code & at line $lineno of file $file\n";
$_ =~ s{<subfield code="&">}{<subfield code="Z">}o;
- } elsif ($_ =~ m#<datafield tag="6" ind1="."#o) {
- print STDERR "Bad datafield tag 6 at line $lineno of file $file\n";
- $_ =~ s{<datafield tag="6" ind1="."}{<datafield tag="600" ind1=" "}o;
+ } elsif ($_ =~ m#<datafield tag="(\d)" ind1="."#o) {
+ my $badtag = $1;
+ print STDERR "Bad datafield tag $badtag at line $lineno of file $file\n";
+ $_ =~ s/<datafield tag="(\d)" ind1="."/<datafield tag="${1}00" ind1=" "/o;
}
$lastline = $_;
More information about the open-ils-commits
mailing list