0
Follow
4
View

set a timeout and error message on my script

dhjboa 注册会员
2023-01-25 09:51

You could use timeout from gnu core utils package(manual)
Maybe do something like:

while read -r ip; do
 timeout [timeout duration] [your ssl command]

 if [ $? -eq 124 ]; then
  echo FAIL
 else
  echo OK
 fi
done