ps -ef|grep 'java -server -Dprogram.name=run.sh'|grep $LOGNAME|awk '{print $2}' >/tmp/stopjboss.out
lins=`wc -l /tmp/stopjboss.out|awk '{print $1}'`
if [ $lins -lt 2 ]; then
echo "It's not running."
else
read realone </tmp/stopjboss.out
kill -9 $realone
echo "Stop finished."
fi
Linux kill 进程
最新推荐文章于 2021-05-13 09:11:38 发布