well I have a file which contains data, I want to add the data on hourly basis, like my file contains data for 24 hours, (so a total of 1440 [60*24]) lines.
Now i want to add the data on hourly basis to get average values.
like if I use (head) command it is ok for first go, but for next next step how can I use it starting from 60 to 120 and so on.
for the first case (from 0 to 60 sec i.e. one hour) i use awk utility and its giving me correct result but for further i cant. Here is the code for first case:
NR represents record number(line number) in awk. So 'NR % 60 == 0' checks if the current line is 60th line and prints the total if it is the 60th line.