1

bash ping ip run command on reply

view story
linux-howto

http://stackoverflow.com – I would like to be able to check for ping replies to two different ip addresses and upon success execute a command. ie ping 8.8.8.8 on response do ping 8.8.4.4 on response execute command if 8.8.8.8 doesn't respond it just does echo "waiting for response from 8.8.8.8" after it does it then goes onto 8.8.4.4 echo "waiting for response from 8.8.4.4" when it does execute command. Any idea how I would convert the above into a bash script? (HowTos)