timestamping a text stream
Andrey Simonenko
simon at comsys.ntu-kpi.kiev.ua
Mon May 19 05:18:13 PDT 2003
On Mon, 19 May 2003 07:52:43 +0000 (UTC) in lucky.freebsd.questions, Andy Farkas wrote:
>
> Does anybody know of a program similar to script(1) or tee(1) that will
> timestamp each line of input as it happens?
>
> Ultimately, I want each line of a `make buildworld` timestamped.
>
Something like this:
#!/bin/sh
cd /usr/src
make buildworld 2>&1 | while read line; do
echo `date` ${line}
done
ps: Sorry for possible duplicated answers...
More information about the freebsd-questions
mailing list