There were several other threads here, but the usual output was similar to "Install File :: Tail". But I am in the old box that we are decompiling, and I just want to write a one-line monitor to monitor the log. I tried installing File :: Tail, but the environment for CPAN just doesn't work, and I don't want to waste time figuring out what the problem is.
I just need a basic script that parses the IP address and counts it for me. However, for some reason, even this simple test does not work:
$ tail -f snmplistener.log|grep IPaddress |perl -ne 'print "LINE: $_\n";'
I think this has something to do with output buffering, but I have always been a bit fuzzy about how this works. How can I work with one liner?
source share