watchDog.sh实例,这个只是个思路,具体你得自己测试#!/bin/sh hello=`ps -ef| grep hello.sh|grep -v grep |awk '{print $2}'` while true;do if [ ! $hello ]; then ./hello.sh fidone