@ptamba Sorry for the confusion, I hope the below sample log file and current output will make things clear.
Sample Log File
TIMESTAMP EVENT ID
Apr 28, 2020 @ 15:17:22.337 Start 1
Apr 28, 2020 @ 15:17:23.215 Saved 1
Apr 28, 2020 @ 15:17:24.440 Start 2
Apr 28, 2020 @ 15:17:24.964 Saved 2
Apr 28, 2020 @ 15:17:25.359 Modified 2
Apr 28, 2020 @ 16:18:29.587 Start 3
Apr 28, 2020 @ 16:18:31.562 Saved 3
Apr 28, 2020 @ 16:18:31.914 Modified 3
Apr 28, 2020 @ 20:07:52.946 Start 4
Apr 28, 2020 @ 20:07:53.304 Saved 4
Current output using Ruby filter
Apr 28, 2020 @ 15:17:22.337 Start - 1
Apr 28, 2020 @ 15:17:23.215 Saved 0.878 1
Apr 28, 2020 @ 15:17:24.440 Start - 2
Apr 28, 2020 @ 15:17:24.964 Saved 0.524 2
Apr 28, 2020 @ 15:17:25.359 Modified 0.919 2
Apr 28, 2020 @ 16:18:29.587 Start - 3
Apr 28, 2020 @ 16:18:31.562 Saved 1.975 3
Apr 28, 2020 @ 16:18:31.914 Modified 2.327 3
Apr 28, 2020 @ 20:07:52.946 Start - 4
Apr 28, 2020 @ 20:07:53.304 Saved 0.358 4
But, I would like to delete the Saved time if the Modified event exists for a given ID. Find below the desired output for above example.
Desired output
Apr 28, 2020 @ 15:17:22.337 Start - 1
Apr 28, 2020 @ 15:17:23.215 Saved 0.878 1
Apr 28, 2020 @ 15:17:24.440 Start - 2
Apr 28, 2020 @ 15:17:24.964 Saved - 2
Apr 28, 2020 @ 15:17:25.359 Modified 0.919 2
Apr 28, 2020 @ 16:18:29.587 Start - 3
Apr 28, 2020 @ 16:18:31.562 Saved - 3
Apr 28, 2020 @ 16:18:31.914 Modified 2.327 3
Apr 28, 2020 @ 20:07:52.946 Start - 4
Apr 28, 2020 @ 20:07:53.304 Saved 0.358 4