Sum of every N lines ; awk

Posted by Sharat Chandra on Stack Overflow See other posts from Stack Overflow or by Sharat Chandra
Published on 2010-04-21T06:36:57Z Indexed on 2010/04/21 6:43 UTC
Read the original article Hit count: 370

Filed under:
|

I have a file containing data in a single column .. I have to find the sum of every 4 lines and print the sum That is, I have to compute sum of values from 0-3rd line sum of line 4 to 7,sum of lines 8 to 11 and so on .....

© Stack Overflow or respective owner

Related posts about awk

Related posts about scripting