Hello,

I'm new in shell scripting and i face some problems.

I need your help to calculate a logarithmic expression in shell script

for example i have 2 variables x1 x2

$x1=3

$x2=5

$Result=`expr x2 * log2 x1` ????

$echo "Result is $Result

I know that this is wrong and i cant find any solution.

what I'm trying to do is to "import" the formula of entropy which is

-Σ x1*log x1 for some values that i have . If someone knows please help me

thanks