日期:2014-05-16  浏览次数:21269 次

求指点:syntax error near unexpected token “fi”的解决办法~~~
ch="1"
while [ $ch != "0" ]
do
echo "********************"
echo "0.Exit"
echo "1.Mount USB"
echo "2.Umount USB"
echo "********************"
echo "Please choose number 1,2 or 0:"
read ch
echo " "
if [ $ch = "1" ]
Then
echo "Please insert your USB"
echo "Are you ready?(y/n)"
read ready
if [ $ready = "y" ]
Then
mount /dev/sdb1 /mnt/usb
echo "Your usb are mounted"
fi
elif [ $ch = "2" ]
Then
umount /mnt/usb
echo "Please take your usb"
elif [ $ch = "0" ]
Then 
echo "Exit now!"
else
echo "Wrong choice!"
echo "Please choose again!"
fi
echo " "
done

这个脚本运行的时候,会提示第21行(也就是第一次出现fi的地方)有错误啊,如题。求解救!!!在线等~~~

------解决方案--------------------
小写then啊,大哥。