rhnaeco
Technical User
- Aug 11, 2005
- 45
Hi,
I have a file of burst data - i.e. data exists every 0.5 seconds for 1 minute, and then there is a 15 minute gap (approx) before any more data is printed.
Can awk average the data (multiple columns) for each burst and print the line of averaged data to a new file?
Input:
23/11/2008 12:02:39.000 0.001 17.229 0.006 0.010 998.744 1473.540
23/11/2008 12:02:39.500 0.001 17.228 0.006 0.010 998.744 1473.537
23/11/2008 12:17:10.000 0.001 16.993 0.006 0.010 998.785 1472.758
23/11/2008 12:17:10.500 0.001 16.991 0.006 0.010 998.786 1472.751
output:
23/11/2008 12:02 0.001 17.228.5 0.006 0.010 998.744 1473.539
23/11/2008 12:17 0.001 16.992 0.006 0.010 998.785 1472.755
I think the data is consistant, but a 'if' approach may be required.
can anyone help?
thanks
R
I have a file of burst data - i.e. data exists every 0.5 seconds for 1 minute, and then there is a 15 minute gap (approx) before any more data is printed.
Can awk average the data (multiple columns) for each burst and print the line of averaged data to a new file?
Input:
23/11/2008 12:02:39.000 0.001 17.229 0.006 0.010 998.744 1473.540
23/11/2008 12:02:39.500 0.001 17.228 0.006 0.010 998.744 1473.537
23/11/2008 12:17:10.000 0.001 16.993 0.006 0.010 998.785 1472.758
23/11/2008 12:17:10.500 0.001 16.991 0.006 0.010 998.786 1472.751
output:
23/11/2008 12:02 0.001 17.228.5 0.006 0.010 998.744 1473.539
23/11/2008 12:17 0.001 16.992 0.006 0.010 998.785 1472.755
I think the data is consistant, but a 'if' approach may be required.
can anyone help?
thanks
R