Use netcat to wait until port 8080 is open while ! nc -z localhost 8080; do sleep 0.1; done; echo test in a separate session open port 8080 (using netcat): nc -l 8080
if
netcat
ortelnet
are not availablehttps://stackoverflow.com/a/19866239/138469