BEGIN{ freq[1]=1049 freq[2]=1182 freq[3]=1464 freq[4]=1467 freq[5]=2930 freq[6]=3006 i=1 } { ch3f[i]=$1 i++ } END{ i = 1 if (i <= 6){ sum = sum + (freq[i] - ch3f[i])**2 } printf("%3.1f \n", sqrt(sum)) }