sh脚本小记

#!/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 &
 
posted @ 2022-12-08 09:31  苏州coder  阅读(14)  评论(0编辑  收藏  举报