#! /bin/bash
requestCount=( grep "stingTofind request in nginx total request in one minutes)
if [ $requestCount -gt 10 ]; then
##here I am trying to check if conditation is true for next 2 minutes on every 30 second interval##
fi
不确定我该如何实现..谁能帮我吗?
谢谢,
写一个函数进行检查。然后循环调用该函数。如果结果正常,请退出脚本。如果结果不正确,请睡眠30秒钟。在四次睡眠30秒后,对此发出警报。