#!/usr/bin/gawk -f BEGIN { line=1; while(getline x < F) { numY=0; split(x, lines,","); if(line%2==0) { for(i=1;i<100;i++){ numY=numY+lines[i]; } ##print numY; print lines[100]","lines[101]; } line++; } close(F); }