(PM) Duplicate log entries solved

Alan L Wendt (alan@ezlink.com)
Fri, 1 May 1998 23:27:13 -0600

ftp://ftp.ezlink.com/pub/software/linux/mergeusage.c is a 200-line C program that
reads a log of usage records and writes a log with overlapping entries merged.

For example, it reads the following log (times in YYYYMMDDHHMMSS format):
START TIME AMT END TIME
19980326143314 USE -3248 19980326152722
19980326143315 USE -3247 19980326152722
19980326143316 USE -3258 19980326152734
19980411085758 USE -4697 19980411101615
19980411085759 USE -4696 19980411101615
19980411085759 USE -4703 19980411101622
19980411104551 USE -12275 19980411141026
19980411104553 USE -12273 19980411141026
19980411104553 USE -12279 19980411141032

and writes this:
START TIME AMT END TIME
19980326143314 USE -3260 19980326152734
19980411085758 USE -4704 19980411101622
19980411104551 USE -12281 19980411141032

Lines not matching the format are passed through unchanged.

Alan Wendt
EZLink Internet Access
-
To unsubscribe, email 'majordomo@livingston.com' with
'unsubscribe portmaster-users' in the body of the message.
Searchable list archive: <URL:http://www.livingston.com/Tech/archive/>