Just got an idea. We should have a utility that prepends a timestamp to every line that is fed to it. This can be used like the nl utility which numbers each line that is fed to it.

This utility can used to prepend timestamps to the log lines generated by a program. Like so:

my_log_generating_script | ts > log_file

[UPDATE:26 May 08] : I have posted a solution here: http://gurjeet-tech.blogspot.com/2008/05/ts-timestampimg-script.html
Post a Comment