How do I capture terminal ping results using apple script
I would like automate a process to monitor an IP address to check if it is reachable. My first thought is to use terminal to send out a couple of pings then capture the results.
Normally when a ping completes you back a few lines in terminal, such as;
'2 packets transmitted, 2 packets received, 0.0% packet loss'
I would use the results, positive or negative, to decide in a script or automator routine what to do next.
Is there a way of capturing that output string, or is there a better way to see if an IP address is up or down. Essentially passing back a true/false state?