检测进程 #!/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