![]() |
|
Just another Perl shrine | |
PerlMonks |
guidance with a realtime log readerby socalheel (Initiate) |
on Aug 29, 2013 at 17:07 UTC ( #1051482=perlquestion: print w/replies, xml ) | Need Help?? |
socalheel has asked for the wisdom of the Perl Monks concerning the following question: i am a complete novice with perl, i am trying so hard to learn this language but i am struggling with perl (a lot really). i developed a bash script that would continuously read a log file, search for a particular string, and if it found the string, email a notification to the admins and restart a service. how exactly could i do this in perl? specifically, i want to tail /var/log/ldap.log and grep for connection_input: conn=11if connection_input: conn=11 is found, then send an email and restart ldap. if it's not found, then no action needed.
Back to
Seekers of Perl Wisdom
|
|