Hi, I've been trying to develop a script that performs the parsing of a log every 1 minute and then generating some statistics. I'm fairly new to programming and this is why I come to ask if I can lend a hand.
I would just like to take on a cron every minute and then generate the statistics (the statistics awk armed I have it) but I need this to give a range of times.
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags
```text
and
```
by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
So the next time awk is run, it should start processing from where it left off before? Or do you want the logfile cleared every time awk is run? or what?
need clean log but every 1 minute because I have another script for statistics armed with this format. Like a cat file | grep x > greped but taking the time especified
Thanks for the immediate response and apologize for the above
I'm still having a hard time figuring out what you actually want. Sometimes you imply the logfile is continuous. Sometimes you imply it's cleared every minute. Sometimes you imply there are several logfiles.
How about you show the exact input you have, the exact output you want, and some pseudocode about how one is derived from the other.