自动停止脚本
#!/bin/bash PID=$(ps -ef | grep xxxxxx-0.0.1-SNAPSHOT.jar | grep -v grep | awk '{ print $2 }') if [ ${PID} ]; then echo 'Application is stpping...' echo kill $PID DONE kill $PID else echo 'Application is already stopped...' fi
标签:脚本,...,grep,stop,PID,echo,Application,kill From: https://www.cnblogs.com/sdgtxuyong/p/17217837.html