#!/usr/bin/env bash #当前运行目录为项目的根目录
servers=("eureka" "zuul" "demo-api")
version="0.0.1-SNAPSHOT" server_name="" jar_name="" for element in ${servers[@]} #也可以写成for element in ${array[*]} do cd $element server_name=server-$element jar_name=./build/libs/$element-$version.jar
#发送命令,结束当前screen运行的jar screen -S $server_name -X stuff $'