Skip to content

Instantly share code, notes, and snippets.

@ben-bradley
Created April 26, 2016 21:11
Show Gist options
  • Save ben-bradley/7d0f22f28cc2b696eae0377bccce1ea4 to your computer and use it in GitHub Desktop.
Save ben-bradley/7d0f22f28cc2b696eae0377bccce1ea4 to your computer and use it in GitHub Desktop.
#!/bin/bash
TARGET=$1
ping -c 1 -a $TARGET &> /dev/null
while [ $? -ne 0 ]; do
sleep 2
ping -c 1 -a $TARGET &> /dev/null
done
ping -c 1 -a $TARGET
echo "$TARGET is up!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment