Skip to content

Instantly share code, notes, and snippets.

# Small function that checks if a TCP port on localhost is open.
#
# Timeout after 10 attempts.
#
# Usage: wait_port <port>
wait_port() (
local i=0 port=$1
echo "waiting on port $port"
# Bash has a magic filesystem that can be used to do basic TCP.
#