Given a normal text-format line-oriented log file with timestamps in absolute form, is there any convenient tool that converts them to relative time-intervals?
e.g.
2019-01-11 19:31:35 UTC LOG: restored log file "0000000A00000299000000B8" from archive
2019-01-11 19:33:44 UTC LOG: restored log file "0000000A.history" from archive
2019-01-11 19:33:44 UTC LOG: redo starts at 299/B8548220
to
2019-01-11 19:31:35 UTC LOG: restored log file "0000000A00000299000000B8" from archive
+00:02:09 LOG: restored log file "0000000A.history" from archive
+00:00:00 LOG: redo starts at 299/B8548220
I know I can write something without too much pain. But surely this is a common enough need that there's something conveniently bundled in coreutils/textutils or easily apt/yum-able?
0 Answers