Hi,
I have a program that constantly displays values on the screen. The program
'ping' for example.
What I'd like to do is watch the output and as soon as i see some values, i
would do something. For example, as suppose when pinging a host I would
constantly get a reply. however, if I remove the network cable, of my pc, I
would start seeing host unreachable or something. As soon as I see this
message, I would like to do something. This is how I want to do this (executing
the program once and watching the output). I could probably run ping every one
second and check the output of each execution, however, that is not how I want
to do it. The program I will be running has to be run only once, like for
example the 'top' program.
Any idea how to accomplish this?
Thanks!
-mic
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/