[techtalk] whiptail and String problem

Michelle Konzack starone at cybercable.fr
Wed Apr 12 22:49:32 EST 2000


>> --checklist "$Text" 15 40 7 0 "Midnight Commander" off 
>>                               ^                  ^
>>                               |                  |
>>                              here must be Quotes !!
>
>	Escape them...like this:
>
>	Item1="0 \"Midnight Commander\" off "
>

Thanks, 

if I use "echo $Item1" it works properly, but not in whiptail !!!

I have used following:

#! /bin/sh

Titel="Michelle's Box"
Text="Michelle bastelt am Debian/GNU-Linux 2.1r5 herum."

Item1="0 \"Midnight Commander\" off "
Item2="1 \"Mouse support\" off "
Item3="2 \"Dos-Tools\" off "
Items=$Item1$Item2$Item3

whiptail --title "$Titel" --checklist "$Text" 15 40 10 "$Items"

but I get the error:

whiptail: bad parameters (see man whiptail(1) for details)

And if I echo the string I get 

0 "Midnight Commander" off 1 "Mouse support" off 2 "Dos-Tools" off

and it is OK. Why ??? If I use whiptail like 

whiptail --title "$Titel" --checklist "$Text" 15 40 10 0 "Midnight
Commander" off 1 "Mouse support" off 2 "Dos-Tools" off

It works !!!

Whats wrong with it ??

Michelle


-- 
Linux rebootet man in drei Fällen: 
Neuer Kernel, neue (Board-)Hardware, Stromausfall....

Aber Windows rebootet man auch in drei Fällen: 
Schutzverletzung, Bluescreen, keinen Bock...






More information about the Techtalk mailing list