Robotronic
Your original awk works just great:
awk -F'"' '
NR==1 {
OFS=FS;
split(FILENAME, x, ".");
prefix=toupper(x[1]"C_");
}
/[Cc][Oo][Uu][Nn][Tt][Yy]/ {
$6=prefix $4;
}
{
print
}' FILENAME_GOES_HERE
My mistake was not realizing that the filename to be processed goes at the bottom of the script.
I thought it was the output from the print command.
The problem now is, how do I pipe several thousand files through the awk?
As you can see I've tried several ways to no avail.
Again, all your help is greatly appreciated.