#!/usr/bin/bash source ./tools.sh trap warn INT EXIT TSTP TERM HUP while : do echo "=========================================" printf "%-5s %-20s %-50s\n" "seq" "功能" "描述" printf "%-5s %-20s %-50s\n" "01" "连接服务器" "连接已经被跳板机支持的服务器,部分机器可能禁止" printf "%-5s %-20s %-50s\n" "02" "添加服务器" "管理员可以添加被连接的服务器" printf "%-5s %-20s %-50s\n" "Q|q" "退出" echo "=========================================" echo "请输入功能编号" read -p ">>>:" seq case $seq in 1|01) connHost ;; 2|02) addHost ;; Q|q) kill -9 $$ ;; *) : esac done