Answer the question
In order to leave comments, you need to log in
How to launch another dialog, on top of a running dialog that is missing the --add-widget token?
I continue to write my script for the automatic installation of one distribution kit. I decided to replace the sequence of commands with an input prompt with dialog boxes using the dialog program .
Since this is an installation script, I thought that a beautiful progress bar is needed. Decided to use --gauge .
I decided that during the installation the progress bar should be in the background, while in the meantime dialog boxes like yes / no or prompts for entering a username, for example, will appear.
So, I made it like this:
while
do
#some code
echo $((++i))
dialog --yesno text 50 50
#some code
echo $((++i))
done | dialog --title 'Test script' --gauge 'Running...' 6 60 0
Answer the question
In order to leave comments, you need to log in
A funny utility, you can really do a lot of things with it.
For starters, the i variable is text, and "$i < 101" doesn't work correctly. Declare it as a number and then $i -lt 101
well, roughly threw what you want
declare -i i
while
do
sleep 1
echo $i| dialog --keep-window --begin 1 1 --gauge 'Running...' 15 15 $i --and-widget --yesno text 50 50
i+=1
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question