Passing positioning array as whiptail -- menu option

I may have asked this before, so forgive OF.
Problem:
I can pass positioning array as -- menu option to whiptail, but it does not show in the whiptail form as an array - only single (first member "lsusb" ) entry / line shows up.

Code:

DynamicEntry=$(whiptail \
--title "DEBUG Dynamic menu build from file $LINENO" \
--backtitle "Current work in progress file $0 " \
--menu "Setup Options"  $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT \
--default-item "10 DEBUG Enable debug " \
 --cancel-button Finish \
 --ok-button Select \
"${arraySYSTEM[@]}" "${arraySYSTEM[@]}"              \
"$arraySYSTEM[$@]" "$arraySYSTEM[$@]"               \
3>&1 1>&2 2>&3)


Partial terminal output :

++ whiptail --title 'DEBUG Dynamic menu build from file 4863' --backtitle 'Current work in progress file /usr/bin/raspi-config-DEBUG.sh ' --menu 'Setup Options' 17 80 10 --default-item '10 DEBUG Enable debug ' --cancel-button Finish --ok-button Select 'lsusb
command desciption default text 
CLI command default description
8 CLI Command
6 CLI Command
4 CLI Command
32 CLI Command
30 CLI Command
2 CLI Command
28 CLI Command
26 CLI Command
24 CLI Command
22 CLI Command
20 CLI Command
18 CLI Command
16 CLI Command
14 CLI Command
12 CLI Command
10 CLI Command' 'lsusb
command desciption default text 

10 CLI Command' 'lsusb
command desciption default text 
CLI command default description
8 CLI Command
6 CLI Command
4 CLI Command
32 CLI Command
30 CLI Command
2 CLI Command
28 CLI Command
26 CLI Command
24 CLI Command
22 CLI Command
20 CLI Command
18 CLI Command
16 CLI Command
14 CLI Command
12 CLI Command
10 CLI Command' 'lsusb
command desciption default text 
CLI command default description
8 CLI Command


Notes:
I used two different syntaxes and neither one shows up as full array.
Since --menu requires TWO strings I just duplicated SAME entries.

The array is loaded as --menu option correctly , but does not show in menu GUI

What did I missed ?

Thanks for help.

This thread seems to be a duplicate of the thread Getting data from file to positioning parameters. Any comments on this topic should be posted in that thread.

1 Like