# get chipid and result from chipid_results_n_w_dmem.txt # insert returncode into xml file { chipid = $1; result = $3; testdate = $3; testtime = $4; xmlfile = sprintf("%d/trd_X.xml", chipid); xmlout = sprintf("%d/trd_X_n.xml", chipid); while ((getline aline < xmlfile) > 0) { where = match(aline, /<\/chip>/); if (where != 0) { print ""result"" >xmlout; } where = match(aline, /.*<\/ReticleSubSite>/); if (where != 0) { print aline >xmlout; print testdate, testtime >xmlout; } else { print aline >xmlout; } } }