<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 12pt; color: #000000'>I can't modify the process itself, or I'd just add the timestamp inside it. I can modify the script that calls the process, so if there's a way of routing it's output to the Linux logging that might be an option. I don't want these messages mixed in with /var/log/messages though. Can you point me towards something? Or just a command name or something to make the googling easier?<div><br></div><div>Scott<br><br><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Jim Kinney" &lt;jim.kinney@gmail.com&gt;<br><b>To: </b>"Atlanta Linux Enthusiasts" &lt;ale@ale.org&gt;<br><b>Sent: </b>Tuesday, November 12, 2013 1:39:42 PM<br><b>Subject: </b>Re: [ale] line timestamp command<br><br><div dir="ltr">Can you modify the process to just write to standard logging?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 12, 2013 at 1:34 PM, Scott Plante <span dir="ltr">&lt;<a href="mailto:splante@insightsys.com" target="_blank">splante@insightsys.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif"><font face="arial, helvetica, sans-serif" size="3">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.&nbsp;</font><div style="font-size:12pt;font-family:arial,helvetica,sans-serif">
<br></div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif">I'm looking for something that would perform the function of this script, maybe with an option for format:</div><div><font face="arial, helvetica, sans-serif"><br>
</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif">while read line;&nbsp;</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif">do&nbsp;</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif">&nbsp; echo $(date +"%D %T") "$line";&nbsp;</font></div>
<div><font face="courier new, courier, monaco, monospace, sans-serif">done<span class="HOEnZb"><font color="#888888"><br></font></span></font><span class="HOEnZb"><font color="#888888"><div style="font-size:12pt;font-family:arial,helvetica,sans-serif">
<br></div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif">Scott</div><br></font></span></div></div></div><br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">-- <br>James P. Kinney III<br><i><i><i><i><br></i></i></i></i>Every time you stop a school, you will have to build a jail. What you 
        gain at one end you lose at the other. It's like feeding a dog on his 
        own tail. It won't fatten the dog.<br>

        - Speech 11/23/1900 Mark Twain<br><i><i><i><i><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br></i></i></i></i></div>
</div>
<br>_______________________________________________<br>Ale mailing list<br>Ale@ale.org<br>http://mail.ale.org/mailman/listinfo/ale<br>See JOBS, ANNOUNCE and SCHOOLS lists at<br>http://mail.ale.org/mailman/listinfo<br></div><br></div></div></body></html>