POSIX Shell

This commit is contained in:
JimChenWYU
2024-09-24 15:09:31 +08:00
parent ed85e4e24c
commit 180905ecba

View File

@@ -1,11 +1,14 @@
#!/bin/bash
#!/bin/sh
# Please use POSIX Shell
# https://www.grymoire.com/Unix/Sh.html
IP=127.0.0.1
PORT=9000
while true; do
nc -zv ${IP} ${PORT}
if [[ "$?" == "0" ]]; then
if [ "$?" == "0" ]; then
exit 0
fi
sleep 2