#!/bin/bash
while true;do
sleep 5;
echo 5;
if [ "$(ps -ef|grep jobtracker|gawk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ')" == "" ]
then
sh /data/local2/jobtracker/bin/jobtracker.sh zoo start
fi
done
nohup ./test > myout.txt 2>&1 &
标签:脚本,bin,grep,jobtracker,sh,小记
From: https://www.cnblogs.com/cbliu/p/16965215.html