Archive of UserLand's first discussion group, started October 5, 1998.

Re: tail -f in a web page

Author:Emmanuel M. Décarie
Posted:11/5/1999; 9:21:32 PM
Topic:A question for Apache gurus
Msg #:12769 (In response to 12768)
Prev/Next:12768 / 12770

A quick hack. Everytime you will call this CGI, you will have the tail on your log.

HTH

#!/usr/bin/perl -T

$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin'; use CGI ':standard'; use CGI::Carp(fatalsToBrowser); use strict; my @s = qx/tail pathToTheLogFile/;

print header; print start_html (-title=>'Tail', -bgcolor=> 'white'); print h1("This a the tail of ...");

foreach (@s) { print "$_
"; }

print end_html;






This page was archived on 6/13/2001; 4:53:22 PM.

© Copyright 1998-2001 UserLand Software, Inc.