18、shell编程应用
时间:2007-06-11 来源:gis76748853
18、shell编程应用
Example 1 CaseExample.sh
echo "Services:"
echo -n "1)ls"
echo -n "2)ls -l"
echo -n "3)Exit"
echo "Please choice[1-3]"
read choice
case $choice in
1) ls;;
2) ls -l;;
3) exit;;
*) echo "Wrong input!";;
esac
Example 1 CaseExample.sh
echo "Services:"
echo -n "1)ls"
echo -n "2)ls -l"
echo -n "3)Exit"
echo "Please choice[1-3]"
read choice
case $choice in
1) ls;;
2) ls -l;;
3) exit;;
*) echo "Wrong input!";;
esac
相关阅读 更多 +