!/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
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
本文标题:shell select 用法
本文链接:https://www.haomeiwen.com/subject/xhwruqtx.html
网友评论