# !/bin/sh PID=$(pgrep -f mdevsys-1.0-SNAPSHOT.jar) if [ -n "$PID" ]; then kill $PID echo "mdevsys-1.0-SNAPSHOT.jar 已关闭" else echo "mdevsys-1.0-SNAPSHOT.jar 未在运行" fi