Adrian Dobrota
asked on
bash script - dialog
I am writing a quite complex (for me) interface using dialog.
I was wondering if anyone can provide a solution for the following situation:
Instead of creating a fix list of items in a menu like this:
dialog --title "bla" --menu "bla2 " 11 60 4 \
"1" "selection 1" \
"2" "selection 2" \
"3" "selection 3 \
"4" "Exit" 2>/tmp/x
I need a VARIABLE list of items
Of course, the dimension of the dialog box can be automatically resized using 0 0 0 as dimension, however I see no solution to getting menu entries from a loop.
It should look like:
dialog --title "bla" --menu "bla2 " 0 0 0 \
for i in 1 2 3 4 5
do
"$i" "selection $i" \
done
"E" "Exit" 2>/tmp/x
Since there's no way AFAIK to introduce a for/while loop inside the dialog body, I'm looking for an alternative.
Anyone can give one?
Thank you
I was wondering if anyone can provide a solution for the following situation:
Instead of creating a fix list of items in a menu like this:
dialog --title "bla" --menu "bla2 " 11 60 4 \
"1" "selection 1" \
"2" "selection 2" \
"3" "selection 3 \
"4" "Exit" 2>/tmp/x
I need a VARIABLE list of items
Of course, the dimension of the dialog box can be automatically resized using 0 0 0 as dimension, however I see no solution to getting menu entries from a loop.
It should look like:
dialog --title "bla" --menu "bla2 " 0 0 0 \
for i in 1 2 3 4 5
do
"$i" "selection $i" \
done
"E" "Exit" 2>/tmp/x
Since there's no way AFAIK to introduce a for/while loop inside the dialog body, I'm looking for an alternative.
Anyone can give one?
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER