shell select 用法

2019-03-01  本文已影响0人  SkTj

!/bin/bash

select i in a b c d
do
case $i in
a)
echo "Your choice is a"
;;
b)
echo "Your choice is b"
;;
c)
echo "Your choice is c"
;;
d)
echo "Your choice is d"
;;
*)
echo "Wrong choice! exit!"
;;
esac
done

上一篇下一篇

猜你喜欢

热点阅读