I would like to run ip monitor
in the background and invoke a script whenever a new block of output is sent to stdout
by ip monitor
(or, ideally, if there are several new blocks sent within say 3 seconds, only invoke the script once)
I would like to use bash
or python
, but I'm open to other suggestions as well.
What is the best way to approach this?