I would like to try to take the stdout of a long-running command, e.g. rsync, and place a timestamp [date] on the beginning of each line of stdout as a trace of progress. For example:
[output of rsync]:
[and create a new output stream]:
Sat May 21 15:51:13 PDT 2011 a.mp3
Sat May 21 15:52:23 PDT 2011 b.mp3
Sat May 21 15:53:33 PDT 2011 c.mp3
Sat May 21 15:54:43 PDT 2011 d.mp3
I know how to do this in bash with simple echos, but the bit with a stdout is a different story.
Any ideas would be appreciated! Thanks!