I have a file which is a result of a script running every two minutes. What I wanted to do is to grep a specific date and time (hour and minute) from the file and then count the occurance of 201. I need to get the result of occurance of 201 every 5 minutes. What should I include in my command below to do that? I know I need to create variables for the date, just don't know how to do it. Thanks in advance! I hope someone can help me.
You don't need so many different 'piped' tools (let alone UUoC)
Not sure I fully understand the requirement......
What's your input? Date? Or data AND time (hour/minute)?
Why do you need 'hour/minute' if you if want to stat count for every FIVE minutes worth of data?
If would help if you could provide
a better/respresentative data sample
what the expected input parameter(s) supposed to be
Thanks for the response. What I need to do is to get the number of occurance of "201" every 5 minutes based on the time from the result.txt file. For example:
Output:
2007-12-18_17:59: to 18:04 201Count=301
2007-12-18_18:05: to 18:09 201Count=100
2007-12-18_18:10: to 18:14 201Count=798
It's you again and it's me again! I don't need a specific date and time. What I need to do is to count the number of occurance of 201 every interval of 5 minutes continously. The result.txt file is continously being appended by data like the sample below. I hope you can help me.
It's you again and it's me again! I don't need a specific date and time. What I need to do is to count the number of occurance of 201 every interval of 5 minutes continously. The result.txt file is continously being appended by data like the sample below. I hope you can help me.