Skip to content

Instantly share code, notes, and snippets.

@dedeibel
Last active July 1, 2019 16:30
Show Gist options
  • Save dedeibel/6807b892487fdb1c2aff43e28c0f2038 to your computer and use it in GitHub Desktop.
Save dedeibel/6807b892487fdb1c2aff43e28c0f2038 to your computer and use it in GitHub Desktop.
wait until a given hostname responds to ping
#!/bin/bash
HOST=$*
while true; do ping -c1 "$HOST" > /dev/null && break; sleep 3 ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment