well how long has that been lurking there?
[migration-tools.git] / marc_cleanup
index f40babb..e717967 100755 (executable)
@@ -174,7 +174,7 @@ sub do_automated_cleanups {
 
         # automatable subfield maladies
         $record[$ptr] =~ s/code=" ">c/code="c">/;
-        $record[$ptr] =~ s/code=" ">\$/code="c"$>/;
+        $record[$ptr] =~ s/code=" ">\$/code="c">$/;
     }
 }
 
@@ -670,7 +670,7 @@ sub initialize {
 
     # defaults
     if ($c->{prefix}) {
-        $c->{output} = join('.',$c->{prefix},'marc','xml');
+        $c->{output} = join('.',$c->{prefix},'clean','marc','xml');
         $c->{exception} = join('.',$c->{prefix},'marc','ex');
     }
     $c->{'renumber-tag'} = 903 unless defined $c->{'renumber-tag'};
@@ -695,9 +695,7 @@ Options
   --exception  -x  Exception (dumped records) MARCXML filename
        or
   --prefix=<PREFIX>>   -p  Shared prefix for output/exception files. Will
-                           produce PREFIX.marc.xml and PREFIX.ex.xml
-
-  --trashfile  -t  File containing trash tag data (see --trashhelp)
+                           produce PREFIX.clean.marc.xml and PREFIX.ex.xml
 
   --renumber-from     -rf  Begin renumbering id sequence with this number
   --renumber-tag      -rt  Tag to use in renumbering (default: 903)
@@ -708,9 +706,11 @@ Options
                            and renumbering is in effect, an old-to-new mapping
                            file (old2new.map) will be generated.
 
-  --nocollapse -n  Don't compress records to one line on output
   --autoscrub  -a  Automatically remove non-numeric tags in data
+  --nocollapse -n  Don't compress records to one line on output
   --strip-nines    Automatically remove any existing 901/903 tags in data
+  --trashfile  -t  File containing trash tag data (see --trashhelp)
+
 
   --script         Store human-initiated ops in scriptfile (.mcscript)
                    Not yet implemented