Create an array from the output of whiptail command
1
vote
1
answer
1180
views
So, I am trying to use
whiptail
command to give users option to choose different things they want to install in their system.
I use the whiptail --checklist
command as below:
name =$(whiptail --title "Tools to install" --checklist 20 78 4 \
"NTP" "NTP setup" OFF\
"Perl" "Perl install" OFF\
"Ruby" "Ruby install" OFF \
"Python" "Python install" OFF 3>&1 1>&2 2>&3)
Now, if my users choose Perl and python, this will output "Perl" and "Python".
What I am looking for is to be able to convert these outputs into an array because ultimately I need to loop through this array. I need to feed these outputs as inputs to next command I am using.
Any help or lead will be highly appreciated!
Asked by BishwashK
(23 rep)
Jul 12, 2022, 04:36 PM
Last activity: Jul 12, 2022, 04:56 PM
Last activity: Jul 12, 2022, 04:56 PM