thegermanguy,
You can use this simple perl program to make your changes.
To use it, in Terminal do the following:
This will make a copy of OLDFILE called NEWFILE with the changes you desire (while preserving the original).
This is a simple program, which could be optimized and have more error checking, yet it will do the job and
is pretty straightforward to read.
You will need to modify it for your other conversion variations, this is marked and should be easy to follow.
Good Luck
Matt
_______________________________________________________________________
#!/usr/bin/perl
$index_line = q[<MTypeName `Index'>];
while ( $line = <> ) {
if ( $line =~ m|$index_line| ) {
$change_line = <>;
$change_line =~ s|<MText `N\.: (.*)'>|<MText `N. $1; Nervus $1'>|;
$change_line =~ s|<MText `V\.: (.*)'>|<MText `V. $1; Vena $1'>|;
### Add in the other variations here, remove the # at the beginning of the line
# $change_line =~ s|<MText `X\.: (.*)'>|<MText `X. \1; XRAY \1'>|;
# $change_line =~ s|<MText `Y\.: (.*)'>|<MText `Y. \1; YANKEE \1'>|;
# $change_line =~ s|<MText `Z\.: (.*)'>|<MText `Z. \1; ZULU \1'>|;
print $line;
print $change_line;
} else {
print $line;
}
}
_______________________________________________________________________
Test File: