shell简单常用脚本

nohup java -jar  -Xms1024m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256M -XX:MaxPermSize=256m -Xdebug -Xrunjdwp:transport=dt_socket,address=8088,server=y,suspend=n -Ddisable.pandora.ons=true ./hulk-pricetag-1.0.0.jar  &

 

kill.sh

NAME=hulk-1.0.0
echo ----------Ready to kill process: $NAME --------------
ID=`ps -ef | grep "$NAME" | grep -v "$0" | grep -v "grep" | awk '{print $2}'`
echo ----------Find pid:$ID----------------------
if [ -z $ID ]; then
        echo '--------Nothing to kill------------------'
        exit 0
fi
for id in $ID
do
        kill -9 $id
        echo "---------killed process:$NAME, pid:$id-------------------"
done

你可能感兴趣的:(Linux)