Before I invent this particular wheel is there anything out there that does this:
If I have a process that outputs to stdout say
Hello world
I have done a long job
I have done another long job
What I want is another process that I can pipe that to its stdin , and it will output
00:00 Hello world
10:00 I have done a long job
20:00 I have done another long job
Know what I mean? Where the first bit is just the current time down to second level.
Just so I know when each line got written. Doesn't have to be bash/ shell, could be python or whatever. Main thing is it doesn't disrupt the primary process, (and it doesn't wait to the end of the primary process before writing anything obviously.)
I would ideally like to capture stdout and stderr but I can do that with 2>&1 can't I?