Hi Guys, I'm having difficulty on how to do the following:
I've got a LARGE file with stats in the below format. I'd like to check and see if column 3 is equal to 0 and would like to get the next record following that record with a non '0' number in column 3 and add the two values of each record found in their column ones. How is this possible? I've thought of using awk, but can't figure out how to set variables equal to data values while reading line by line. any help is much appreciated! Thanks!
example table:
A B C D E
4322.455 432 0 90090 54900
5663.696 959 0 59206 90230
3902.552 293 41 90509 89289
...
here i'd like to save the value 4322.455 and add it to value 3902.552
I've got a LARGE file with stats in the below format. I'd like to check and see if column 3 is equal to 0 and would like to get the next record following that record with a non '0' number in column 3 and add the two values of each record found in their column ones. How is this possible? I've thought of using awk, but can't figure out how to set variables equal to data values while reading line by line. any help is much appreciated! Thanks!
example table:
A B C D E
4322.455 432 0 90090 54900
5663.696 959 0 59206 90230
3902.552 293 41 90509 89289
...
here i'd like to save the value 4322.455 and add it to value 3902.552