Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Watch log for string (tail -f)

by roboticus (Chancellor)
on Oct 11, 2012 at 20:25 UTC ( [id://998534]=note: print w/replies, xml ) Need Help??


in reply to Watch log for string (tail -f)

hmb104:

"Not working" isn't particularly helpful. What is it doing? Any error messages, etc.?

Anyway, here's how I process the a log file with tail -f:

#!/usr/bin/perl use strict; use warnings; open my $FH, 'tail -f t |' or die; while (<$FH>) { chomp; # processing goes here.... }

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://998534]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-26 08:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found