Tim Uckun wrote:
> Ah if I am going to do that I suppose something like this would work.
>
> #!/bin/sh
> while read data; do
> echo "`date +%H:%M:%S` : $data" >> logfile.log
> done
>
If that works, great. I'm not sure if you'll run afoul of output
buffering in this situation. Clearly you've got the right idea, just
need to make sure it behaves as you expect and doesn't clump the line
reads into larger chunks.
The main improvement in the Perl implementation over this is the ability
to do things like adjust timeout behavior easily.
--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.com