Here is a code snippet using whiptail , it fails to complete giving me long list of options available for whiptail .
That is great, but how do I determine which of the current opinions is wrong?
I did tried inserting comment (#) into options and it just did not work.
Deleting the option created another errors.
So in case of "checklist" - can I start with minimum code which would compile and then add "options" to it ?
Cheers
PS
My main problem using bash is having or not having spaces in right places.
That is hard on old eyes. Maybe that is the issue here.
case $ADVSEL in
108 1)
109 echo "Option 1"
110 pause
111 whiptail \
112 --title "checklist test Option 1" \
113 --checklist \
114 --separate-output "Choose: " 20 78 15 \
115
116 "John" "" on \
117 "Glen" "" off \
118 "Adam" "" off 2>results
119
120 echo "HERE Option 1"
121
122 pause
123
124 while read choice
pause
123
124 while read choice
125 do
126 case $choice in
127 John) firstroutine
128 ;;
129 Glen) secondroutine
130 ;;
131 Adam) thirdroutine
132 ;;
133 *)
134 ;;
135 esac
136 done < results
137
138 exitstatus=$?
139 if [ $exitstatus = 0 ]; then
140 echo "Test Status OK " $OPTION
141 else
142 echo "Test Status failed"
143 fi