检测进程
#!/bin/bash
name="hilinkapp"
while true
do
count=`ps -ef | grep $name | grep -v "grep" | wc -l`
if [[ $count == 0 ]];then
echo "process not exist"
else
echo "process exist"
fi
sleep 3
done
————————————————
版权声明:本文为CSDN博主「PHeart」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_41013199/article/details/122255479