#! /bin/bash for((host=27; host<=29; host++)) do echo "********************* jxkh$host *********************" # 查看各节点jps相关服务及端口号 ssh jxkh$host '/etl_jxkh/jdk1.8.0/bin/jps' done