DATE ID LOG_LEVEL | EVENT
2009-07-23T14:05:11Z T-4030097550 D | MessX
2009-07-23T14:10:44Z T-4030097550 D | MessY
2009-07-23T14:34:08Z T-7298651656 D | MessX
2009-07-23T14:41:00Z T-7298651656 D | MessY
2009-07-23T15:05:10Z T-4030097550 D | MessZ
etc
How do I produce a report that looks like
ID = T-4030097550
2009-07-23T14:05:11Z MessX
2009-07-23T14:10:44Z MessY
2009-07-23T15:05:10Z MessZ
ID = T-7298651656
2009-07-23T14:34:08Z MessX
2009-07-23T14:41:00Z MessY
etc
Other info:
The IDs are not pre-determined
The messages in the report are actually a subset of the log-entries and some messages may be missing for a given ID.
One thing I ommitted was that the message elements is actually a text string so each record is more of the format
2009-07-27T08:08:18Z T-6769544753 D | this is some log entry
In this case I wnat to pick up all fields from column 5
The other thing is if I only want to pick up log entries that contain strings of interest is there a simple of way of seeding this from a file with the entries.
My alternative was to run a log of grep statements for each string and then sort the resulting file by timestamp (column 1) before presenting it to the script you provided. - I suspect there is a better way.