手记

shell编程中的循环分享

if [ ];then
echo "xxx"
else
echo "xxx"
fi

if []
then
echo "xxx"
elif []
then
echo "xxx"
else
echo"xxx"
fi

case "$变量名" in
"xx")
echo "dfadfad"
;;
"yy")
echo "dadfs"
;;
*)
echo "dafdsadsfs"
;;
esac

for i in $()
do
echo "fasfa"
done

for((i=1;i<=100;i=i+1))
do
echo "dddd"
done

while [条件判断 ]
do
echo "dadfs"
done

1人推荐
随时随地看视频
慕课网APP