I have a tool that outputs to standard output every so often, without loss of generality, let's say that the sequence goes:
mysystem$ ./runme
Starting
Done
mysystem$
Now 'runme' takes a while to complete so I'd really like to get the shell to give me
mysystem$ somecommand ./runme
0952 Starting
1134 Done
mysystem$
Or some approximation of this... any ideas? Would be happy with things like writing to file and so on...
EDIT love the quick response so far but I should have been clearer...
There may well be intermediate statements made by the program so I'd really like to get the shell to give me
mysystem$ somecommand ./runme
0952 Starting
0959 Somewaythough
1011 Mostly done
1134 Done
mysystem$
But this may well be impossible...
sleep 5cannot be timed the way you want it to. Please clarify which it is. – Daniel Beck Nov 10 '11 at 17:18