#!/bin/bash
echo "what is your favourite os ?"
select name in "linux" "window" "mac" "unix"
do
echo $name
done
echo "you have selected $name"
#!/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
来源:CSDN
作者:Aa. NiceMan
链接:https://blog.csdn.net/AaNiceMan/article/details/104315077