Re: [squid-users] tail on /var/log/squid/access.log

From: Colin Campbell <sgcccdc@dont-contact.us>
Date: Thu, 31 Oct 2002 08:57:26 +1000 (EST)

Hi,

On Wed, 30 Oct 2002 zeluis@objetivo-americana.com.br wrote:

> As I could use the tail command to read logs of the
> file /var/log/squid/access.log and to send to a program GCC as parameter.
>
> Something as:
>
> 'tail -s 1 -n 1 -f /var/log/squid/access.log | my_c_program'

"-s 1" i sthe default. I suspect the "-n 1" is overridden by the "-f" so
all you really need is:

        tail -f /var/log/squid/access.log | my_c_program

Do you get any output from:

        tail -f /var/log/squid/access.log

If you do and you get nothing from

        tail -f /var/log/squid/access.log | my_c_program

then "my_c_program" is probably broken. It should read stdin.

Colin

--
Colin Campbell
Unix Support/Postmaster/Hostmaster
CITEC
+61 7 3227 6334
Received on Wed Oct 30 2002 - 16:04:54 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:10:57 MST