In my log file where I want to keep the first and last of each run, now I'm going to have records for several different servers. In each run of "OK" records, I want to keep the first and last record for each server. For example, I'd want to keep the records marked > in this excerpt:
> t0 error on some server > t1 OK server1 > t2 OK server2 t3 OK server1 t4 OK server1 t5 OK server1 > t6 OK server2 > t7 OK server3 > t8 OK server1 > t6 error on some other server Anybody got a way to do this? Obviously my UNIQUE|PREDSELECT trick's no good for the last occurrences, since I have to wait till the end of the run to identify them. I'm wondering if, to keep them in order, I might actually have to number and resort the records in each run--note that the first occurrence of server3 in my example falls in between the last occurrences of the others.
