I need a help on doing some operation on multiple files using awk.
I have total of 500 files which each file contains 800 lines of data with two columns (1st column and 2nd column).
I want the first line, 2nd column of each file (from all 500 files) to be added and calculate the average and store in a new output file (lets say average.out).
Then it goes on to second line, 2nd column of all files (all 500 files) and calculate the average and store in average.out. And it continues until the "average.out" file contain 800 lines.
I badly need to solve this calculation before going on with other calculations of my data. Hope I get some insight.
thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…