Skip to content

Instantly share code, notes, and snippets.

@sebw
Created November 26, 2014 09:48
Show Gist options
  • Save sebw/529d3e12ab2556d8165d to your computer and use it in GitHub Desktop.
Save sebw/529d3e12ab2556d8165d to your computer and use it in GitHub Desktop.
Bash: loop until a network connection is successful
while ! nc -vz localhost 3306; do sleep 1; done
echo 'Database is available'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment