awk search/replace specific field, using variables for regexp & subsitution then overwrite file

view story

http://www.unix.com – Hello, I'm trying the solve the following problem. I have a file which I intend to use as a csv called master.csv The columns are separated by commas. I want to change the text on a specific row in either column 3,4,5 or 6 from xxx to yyy depending upon if column 1 matches a specified pattern. The column to change (i.e. 3/4/5/6) is dependent upon the value of the variable in a nested loop The awk statement is located within a nested loop of a parent loop. It will use the variable value from the parent loop for column 1 and the variable value from the nested loop for column 3/4/5/6. Below is a (HowTos)