I am using the below code to present users with a menu for them to select which software they would like to install. I then want to use the selections as function calls to perform the installs.
OPTIONS=$(dialog --no-tags --clear --backtitle "Installer Options..." --title "Software Selection" \
--checklist "Use SPACE to select/deselct options and OK when finished." 30 100 30 \
install_software_a "Install software A" off \
install_software_b "Install software B" off \
install_software_c "Install software C" off 2>&1 > /dev/tty)
$OPTIONS
The code works well for capturing the selections. The issue that I am having is that it writes the selections onto a single line, like below if the first two are selected:
install_software_a install_software_b
When the call is made to $OPTIONS, it is only installing the first software selected. Is there a way I can format the OPTIONS variable to have the selections written on separate lines like below:
install_software_a
install_software_b
TIA!
John