I want to do the following operation with a simple bash script:
- ping an host [with count 4]
- when ping returns total time passed [such as 515 ms for all 4 packets]
- get this result and compare it with a number, if eg. this total time is higher than 750ms
- send an alarm to syslog [that syslog part is not important, just echoing something to screen would be enough]
I think it should be possible without referring to C language.
Any "working" source code (in this case a bash script) shall resolve...