6 while getopts c:t: opt; do
16 if [[ $# -lt 2 || $even_args -ne 0 ]]; then
17 echo "args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ..." >&2
21 while [[ $# -ge 2 ]]; do
27 echo "Waiting for $host port $port..."
28 timeout $tmout bash -c 'until nc -vz "$host" "$port"; do echo -n ".";
32 if [[ $rc != 0 ]]; then
33 echo "$host port $port cannot be reached"