[PLUG] Help with log file merge script?

Sean, Sharon and Kyle Harbour sharbours at yahoo.com
Tue Sep 23 22:35:03 UTC 2003


Can someone provide me with an example on how to do this? I have two
log files that are in this format, a date stamp and a value:

log file 1		Log file 2

200309231012	50	200309231012	25
200309231013	75	200309231013	50
...

I want to create a third log file that is has the aggregate values of
the first two log files, that looks like this:

log file aggregate of 1 and 2

200309231012	75
200309231013	125
...

What's a quick way to do this?
I've got as far as sketching out creating two arrays in a bash
script, adding the 2nd value of each array into a third array and
dumping this back to a file, but there has got to be a nice simple
way to do this. It doesn't have to be all that fast, it's a cron job
that runs every 5 minutes and handles about 1000 data points max.

Sean Harbour



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com




More information about the PLUG mailing list