1. #找出匹配的
    2. sp_pid=`ps -ef | grep cc-member-service.jar | grep -v grep | awk '{print $2}'`
    3. if [ -z "$sp_pid" ];
    4. then
    5. echo "[ not find cc-member-service.jar pid ]"
    6. else
    7. echo "find result: $sp_pid "
    8. kill -9 $sp_pid
    9. nohup java -jar -Dspring.profiles.active=test -Xmx400m -Xms400m cc-member-service.jar > shop.out 2>&1 &
    10. tail -f member.out
    11. fi
    1. # 清空
    2. for i in `ps -ef | grep 'ssh -CfNg -L' |awk '{print $2}'`;
    3. do echo "stopping [ $i ] ......";
    4. kill -9 $i;
    5. done