I have 3 to 4 different files, from that i need to take a Average of numbers from a particular column. here i have to take 4th column,
that should present in diff. file.
but i forget to mention that i have match the 2nd col. value in every file if it matches then i need to take the average of those 4th col. value only not in column wise
Ex: 11 is match i need to take average 12.00, 11.00 and 13.00
I get 41.905 with your script and 35.9186 using my script, which I guess is not correct. I don't see any difference except NR>1
Does the contents of all the three files gets concatenated before it is feed to awk? I guess NR>1 will remove header from first file, but will not remove headers from other two files. Is it so?