Script to wait for a specified port to go online or to go offline.
Sample below with invalid parameter.
$./xl_wait_port.sh 8080Usage: xl_wait_port.sh [port] [ up | down ] e.g. xl_wait_port.sh 12004 upReport bugs to: email@example.com
Sample below with correct parameters. Intentionally interrupted with CTRL-C.
$./xl_wait_port.sh 8080 downInitiating wait.Waiting for port 8080 to go down.^CWarning. xl_wait_port.sh has been interupted.
port - Port number to wait for
up - If waiting for the port to go online
down - If waiting for the port to go offline
Enhancements may take some time, I know it is easy but given that the author is just updating the code on a per need basis. All mentioned enhancements are noted below for future reference so that the author may not forget.