Robotronic,
If I could bother you a bit more?
I pretty much understand what is going on, but there are a few areas that are still a bit murky.
If I am reading it right, the script breaks down as:
The -F '"' sets the field separator to a quote mark
The entire script is enclosed in a single quote or is it a back tick??
The NR==1 does ??
The OFS=FS; sets the Output Field separator equal to the Field separator or a quote mark.
The split(FILENAME, x, ".") sets the variable x with the first two character of the filename, using the . as field separator.
The prefix=toupper(x[1]) "c_"; sets the variable prefix to the contents of the variable x which has been converted to upper case and adds the "C_".
The /<sub_unit / { finds the lines to be modified???
$6=prefix $4; sets field 6 to the contents of the variable prefix and the contents of field number 4.
print sends it to output. Does it overwrite the existing xml or should it write to a temporary file and then move the temp to overwrite the original??
Again, thanks a million, I really appreciate the assistance.