- 论坛徽章:
- 0
|
写了一个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 |
|