[ale] line timestamp command

Jim Kinney jim.kinney at gmail.com
Tue Nov 12 13:39:42 EST 2013


Can you modify the process to just write to standard logging?


On Tue, Nov 12, 2013 at 1:34 PM, Scott Plante <splante at insightsys.com>wrote:

> 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
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>


-- 
-- 
James P. Kinney III

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.
- Speech 11/23/1900 Mark Twain


*http://heretothereideas.blogspot.com/
<http://heretothereideas.blogspot.com/>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20131112/21c46348/attachment.html>


More information about the Ale mailing list