github.com/phillinzzz/newBsc@v1.1.6/tests/truffle/scripts/utils.sh (about) 1 wait_for_host_port() { 2 while ! nc -v -z -w 3 ${1} ${2} >/dev/null 2>&1 < /dev/null; do 3 echo "$(date) - waiting for ${1}:${2}..." 4 sleep 5 5 done 6 } 7 8 get_host_ip() { 9 local host_ip 10 while [ -z ${host_ip} ]; do 11 host_ip=$(getent hosts ${1}| awk '{ print $1 ; exit }') 12 done 13 echo $host_ip 14 }