BEGIN{ line=1; while(getline x < F){ if(line%2!=0){ split(x,words,","); if(words[10]<50){ if((words[12]==1002)){ words[12]=1; } out=""; for(i=1;i<12;i++){ out=out words[i]","; } out=out words[12]; print out; }else print x } line++; } }