[ale] line timestamp command

Scott Plante splante at insightsys.com
Tue Nov 12 13:34:22 EST 2013


Does anyone happen to know of a command line tool that will read lines from standard input and write them to std out, pre-pending a timestamp? I have a process that emits messages to std out periodically as it processes and I'd like to write that to a log file, but with a time at the start of the line. I could do it with a script but a nice little command would be better, if it exists. 


I'm looking for something that would perform the function of this script, maybe with an option for format: 


while read line; 
do 
echo $(date +"%D %T") "$line"; 
done 



Scott 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20131112/e6dfee33/attachment.html>


More information about the Ale mailing list