ÎҵĽű¾ÈçÏ£¬
echo "secvise"
echo "1)ls"
echo "2)ls -l"
echo "3)Exit"
echo "choice[1-3]"
read choice
case $choice is
1) ls;;
2) ls -l;;
3) exit;;
*) echo "wrong";;
esac
Ö´Ðк󣬳öÏÖ./diahufuwu.sh: line 8: syntax error near unexpected token `ia'
./diahufuwu.sh: line 8: `case $choice ia'
ºÃÏñ¡°is¡±³ö´íÁË£¬²»ÖªÈçºÎ¸Ä£¬Íû¸÷λǰ±²Ö¸µã
yuer520 ÓÚ 2011-07-07 23:27:12·¢±í:
ŬÁ¦
yuer520 ÓÚ 2011-07-07 23:26:53·¢±í:
ÕâÑù¶¼ÄÜ´í£¿
2008chenwanxi ÓÚ 2009-05-18 10:16:24·¢±í:
2# dingjing
лл£¬Íû³ÉΪºÃÓÑ£¬Ê±¿ÌµÃÒÔÁì½Ì
dingjing ÓÚ 2009-05-17 15:10:57·¢±í:
case $choice is
1) ls;;
2) ls -l;;
3) exit;;
*) echo "wrong";;
esac
²»ÊÇis£¬ÊÇÓÃin£¬¸ÄΪ£º
case $choice in
1) ls;;
2) ls -l;;
3) exit;;
*) echo "wrong";;
esac