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
g...@2ndquadrant.com  www.2ndQuadrant.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to