Adding 99 to the minute and second as they are writen to the array appears to fix the problem.
I think awk was interpreting the single digits being read in as strings. When I was later trying to reference the array I was cycling through using numbers.
It returns a 0 since there was nothing in...
The output is correct but I have a problem when I process 100Mb files of this data. I can create a test file which works perfectly for the single digit minutes and seconds (see below). But when I come to process the larger files I get nothing but strings of zeros for the minutes 0-9 and seconds...
Sorry should have posted some example data. Note that this is just a tiny part of the data. Each file represents 1 hour so there is no hour field for time.
minute,second,fraction_sec,type,ID,error_check,data1,data2,data3,data4
0,50,17171598,2,,,17000,49,,3320
0,50,17177944,2,,,39000,58,,7024...
Have the following data:
minute, second, fraction_sec, type, ID, data1, data2, data3
Want to count the number of entries (rows) in each second when, say, type==1 && data1==0 which occur in the file for each ID. Note the IDs are letters and numbers (hexadecimal) so the only way I could think of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.