Originally Posted by waddles
Using "sleep" could miss an event so this is not useable here.
The same problem exists whether foreground or background.
My idea was that your script would *check* if the event requiring further action had occurred; i.e., according to the OP if interface eth0 was active; if eth0 was not active, the script would sleep for a second, then check again, and keep looping that way.
Maybe it'd be more helpful if you'd say what you're trying to do.