How to check any server port using shell script until its start

How to check any server port using shell script until its start
or,
Check to Wait for a new port establish connection using shell script


echo "Waiting for server port Up in a minute..."

while ! nc -z localhost 5000; do
  sleep 0.1 # wait for 1/10 of the second before check again
done

Post a Comment

Mới hơn Cũ hơn