|laziness, impatience, and hubris|
reading output from another scriptby Octavian (Monk)
|on Jul 23, 2003 at 14:27 UTC||Need Help??|
Octavian has asked for the wisdom of the Perl Monks concerning the following question:
Help! I am in need of some divine wisdom!
I have been asked if there is a way to monitor the output of an exsisting script and send an email notification if a certain event occurs. The script that runs dumps its output to standard out, and runs forever or until killed.(Imagine doing a tail -f on syslog.log or something, they want to be notified if a certain condition occurs) I tried throwing it into an array, but that just sits there until it is finished getting STDIN, which in the case of this script, never happens so that doesnt work...
So my question is this: Is there a way to my perl script monitor in real time the output of another script while it is dumping output? they are looking for a way to do a
have ./monitor.pl call script and watch it...either way works...but I am starting to doubt that it can be done..
update (broquaint): added <code> tags and some further formatting