I'm new to awk, and I can't seem to figure this one out. How can I substitute in a single field using a regular expression?
In perl, I could assign the field of interest to a variable, then $myvar =~ s/foo/bar/g
. Of course also in perl I have to do my own field management, and that's easier in awk.
For the issue at hand just now, it's European money records and I want to change commas to periods in the amount field. But I need to target only that field, so I don't mangle the other fields where commas could be used as prose punctuation.
Is the solution more difficult than I imagine? Or simpler? Do I have to change the record separator or something tacky like that?
Thank you for your help!