Simple arithmetic works but bit complex arthimetic fails of possible syntax error. How should I handle this in shell script
Any suggestions please
Code:
/tmp >
/tmp > cat t.ksh
a=3
b=5
c=`expr $a \* $b`
echo c=$c
var1=4
var2=5
var3=11
var4=15
result=`expr 100 - (( ( $var1 + $var2 ) \* 100 ) / ( $var3 + $var4))`
/tmp >
/tmp >
/tmp > t.ksh
c=15
t.ksh[11]: 0403-057 Syntax error at line 1 : `(' is not expected.
/tmp >
/tmp >
/tmp >
Any suggestions please