shell 循环
while循环,条件为真时执行
i=0
while [ $i -lt 10 ]
do
echo $i
let i++
done
until循环,条件为假时执行
i=0
until [ ! $i -lt 10 ]
do
echo $i
let i++
done
case循环
echo "php|apache|mysql"
echo "输入你的选择:"
read choice
case $choice in
php) echo "你选择的是$choice"
;;
apache) echo "你选择的是$choice"
;;
mysql) echo "你选择的是$choice"
;;
esac
select
select system in "centos" "redhat" "ubuntu"
do
echo "you system is:" $system
done