Chinaunix

标题: 关于LOOP的问题 [打印本页]

作者: afton    时间: 2010-11-06 00:48
标题: 关于LOOP的问题
写了一个bash shell,运行的时候没有执行循环,什么问题呢?

#prompt the user to enter pathname and store it to a variable
pathname=$(zenity --entry --text "Please enter Bash shell script FULL pathname: ")
ls $pathname > /dev/null 2> /dev/null  #check if the pathname exists
#for $pathname in $HOME/*
while [ $? -ne 0 ]
do
zenity --entry --text "File pathname\"$pathname\"cannot be used.\n\nPlease check if you can create file in that directory path.\n\nPlease re-enter a valid FULL script pathname"
#if wrong, diplay the waring information
done




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2