Sample Header Ad - 728x90

Array into whiptail menu - BASH

4 votes
2 answers
10066 views
I would like to show user friendly whiptail menu. My goal in whiptail is this: Choice1 Choice2 Choice3 Choice4 I have array consist of: Choice1 Choice2 Choice3 Choice4 I run array through loop for like this: for value in ${value[@]} do echo "$value" done I could not add whiptail inside echo because I get 4 another menus. I tried script like this: $val=$(whiptail --title "xx" --menu "choose" 16 78 10 for value in ${value[@]} do echo "$value" done 3>&1 1>&2 2>&3) After run above mentioned script my shell looks horrible. shell after script: enter image description here Is there anybody who solve my problem?
Asked by Michal N. (141 rep)
Jan 1, 2016, 07:43 PM
Last activity: Nov 22, 2021, 07:46 AM