help___高手样帮帮忙···
linux吧
全部回复
仅看楼主
level 2
waiwaixiong_ 楼主
#!/bin/bash
#Learn how to use select
PS3='Please select:'
select f in *do  
echo "The number you enter is:$REPLY"  
echo "The file you choose is:$f"  
echo "The contend of the file is:"  
cat $f  
while (($REPLY=0))  
do  
exit 1  
done
done
我想输入0后,能够退出,这样写为什么不行呀??
2010年10月12日 06点10分 1
level 2
while (($REPLY=0))
试试改为
while [ "$REPLY" -eq 0 ]
那个是bash的发言吗? 反正我不太熟悉。
2010年10月12日 08点10分 3
level 2
select f in *do
fixed ===>
select f in *
do  
2010年10月12日 08点10分 4
level 2
(我想输入0后,能够退出.)
你为什么不用if 而用 while ?
[歪头]
2010年10月12日 08点10分 5
1