#!/bin/sh
# Ask some questions and collect the answer
dialog --title "Questionnaire" --msgbox "Welcome to my simple survey" 9 18
dialog --title "Confirm" --yesno "Are you willing to take part?" 9 18
if [ $? !=0 ] ; then
dialog --infobox "Thank you anyway" 5 20
sleep 2
dialog --clear
exit 0
fi
dialog --title "Questionnaire" --inputbox "Please enter your name" 9 30 2
Q_NAME=$(cat _1.txt)
dialog --menu "$Q_NAME, what music do you like best?" 15 30 4 1 "Classical" 2 "Jazz" 3
"Country" 4 "Other" 2>_1.txt
Q_MUSIC=$(cat _1.txt)
if [ "$Q_MUSIC" == "1" ] ; then
dialog --msgbox "Good choice!" 12 25
fi
sleep 5
dialog --clear
exit 0
可以看见的是Welcome to my simple survey,Are you willing to take part,Please enter your name,Good choice! 这四个的框,而Thank you anyway和dialog --menu "$Q_NAME, what music do you like best?" 15 30 4 1 "Classical" 2 "Jazz" 3"Country" 4 "Other" 都看不到,就直接Good choice! 结束了,求教一下各位高手怎么解决一下啊...
# Ask some questions and collect the answer
dialog --title "Questionnaire" --msgbox "Welcome to my simple survey" 9 18
dialog --title "Confirm" --yesno "Are you willing to take part?" 9 18
if [ $? !=0 ] ; then
dialog --infobox "Thank you anyway" 5 20
sleep 2
dialog --clear
exit 0
fi
dialog --title "Questionnaire" --inputbox "Please enter your name" 9 30 2
Q_NAME=$(cat _1.txt)
dialog --menu "$Q_NAME, what music do you like best?" 15 30 4 1 "Classical" 2 "Jazz" 3
"Country" 4 "Other" 2>_1.txt
Q_MUSIC=$(cat _1.txt)
if [ "$Q_MUSIC" == "1" ] ; then
dialog --msgbox "Good choice!" 12 25
fi
sleep 5
dialog --clear
exit 0
可以看见的是Welcome to my simple survey,Are you willing to take part,Please enter your name,Good choice! 这四个的框,而Thank you anyway和dialog --menu "$Q_NAME, what music do you like best?" 15 30 4 1 "Classical" 2 "Jazz" 3"Country" 4 "Other" 都看不到,就直接Good choice! 结束了,求教一下各位高手怎么解决一下啊...