Skip to content

Instantly share code, notes, and snippets.

@jcderr
Created July 30, 2015 16:46
Show Gist options
  • Save jcderr/b726dafb947935173092 to your computer and use it in GitHub Desktop.
Save jcderr/b726dafb947935173092 to your computer and use it in GitHub Desktop.
[W]ait [U]ntil [P]ort [I]s [A]ctually [O]pen
#!/bin/bash
# usage: wupiao [ip] [port]
# inspired by script of same name from Kubernetes project
# we're going to test any port, though, not just HTTP
[ -n "$1" ] && [ -n "$2" ] && while ! nc -z $1 $2; do sleep 1 && echo -n .; done;
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment