1、根据不同的选项执行命令

 

#!/bin/bash

cd /iflytek/client/kafka/kafka/bin

echo "1--ZDR_RY_WWAB_RYHLXX"
echo "2--ZDR_RY_WWAB__RX_ZJHM"

read -p "please input 1-10:" num

case $num in
 1)
 echo "执行ZDR_RY_WWAB_RYHLXX"
 ;;

 2)
 echo "ZDR_RY_WWAB__RX_ZJHM"
 ;;

 *)
 echo "错误输入,请按要求输入"
 exit 1
 ;;

esac

 

posted @ 2020-07-06 15:28  WH·xiao  阅读(164)  评论(0编辑  收藏  举报