2008年8月20日星期三

shell to kill and wait weblogic server

shell to kill and wait weblogic server

#!/bin/sh
echo killing
ps -ef|grep weblogic.Server|grep java|awk '{print $2}' | xargs kill
echo waiting
running=1
while [ $running != "0" ]
do
sleep 1
#ps -ef|grep weblogic.Server|grep java | wc -l
running="`ps -ef|grep weblogic.Server|grep java | wc -l`"
echo running = $running
done
echo done
ps -ef|grep weblogic.Server|grep java

没有评论:

博客归档

neoedmund's shared items

我的简介

ZIP Code File