View Single Post
Old 02-19-2004, 07:17 AM  
Dusen
Confirmed User
 
Join Date: Aug 2002
Location: East Coast.
Posts: 2,251
PHP Code:
#!/usr/bin/perl

while (1) {
open LOG'access_log' || die "no can open file: $!";

seek(LOG,0,2);
for(;;) {
headerloop: while(<LOG>)
{
        
chomp;
        if (/.*(
texttofilter).*/)
        {
        
open YOURLOG'>> /home/me/outputfile' || die "can not write to file";
        print 
YOURLOG "$_","\n";
        }

}
sleep(1);
seek(LOG,0,1);
close YOURLOG;
}

Thanks

The grep option works without sending to file AND sending to file works without the grep there. It seems that soemthing is messed up.
__________________
Penis Pill Sponsor List and Reviews:
http://www.pillsponsors.com
Dusen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote