I have a large data file consisting of many columns, and I would like to put (say) a third column and output it to a separate file.
As a result of binning, I mean the following:
I have a list of numbers:
1 4 1 1 1 1
I want the average number of sets (say) of three consecutive numbers.
My end result should be
2 1
The first entry is the average
1 4 1
And the second entry is the average of the next three numbers,
1 1 1
How to achieve this with awk?
source share