aboutsummaryrefslogtreecommitdiff
path: root/utility_examples/mixedgauge_example.sh
blob: 900639f9ee84db9fb673018b4cfbf93a3fef8fd0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

input="A B C D E F G H"
total=`echo $input | awk '{print split($0, a)}'`
curr=1
for i in $input
do
        perc="$(expr $(expr $curr "*" 100 ) "/" $total )"
        curr=`expr $curr + 1`
	./bsddialog --title " mixedgauge " --mixedgauge "Hello World! Press <ENTER>" 20 35 $perc \
		"Hidden!" 8	\
		"Label 1" 0	\
		"Label 2" 1	\
		"Label 3" 2	\
		"Label 4" 3	\
		"Label 5" 4	\
		"Label 6" 5	\
		"Label 7" 6	\
		"Label 8" 7	\
		"Label 9" 9	\
		"Label X" -- -$perc
	#sleep 1
done