I have some variables which have stored numerical values like
Quote:
A1=10 A2=20 A3=25
B1=10 B2=15 B3=12 and so on
As well as another set of variables which stored these variables like
Quote:
var1=A1 var2=A2 var3=A3
var4=B1 var5=B2 var6=B3 and so on
I have to calculated things using second set of variable.
In the script, there is line
Code:
read number
user will enter number manually, suppose 500
I have to calculate using
Code:
expr 500 \* ${$var1} / 100
and output of this multiplied by
Code:
expr $above_output \* ${$var2} /100
and output of this multiplied by
Code:
expr $above_output \* ${$var3} /100
But not able to deal with two levels of variable. The calculation will be hard when it comes for three level and four level.
Please help.