[bash shell] how to calculate float times float

It is noted for myself, please do check for yourself.

#!/bin/bash
#
###########################################
alpha=0.0
for((i=0;i<=10;i++))
do
    alpha=`echo "scale=2;$i*0.1"|bc`
    echo "####################"$i
    echo "alpha="$alpha
    echo $alpha > input_b21_temp.txt
    root -l -q b21_mc_alpha.C < input_b21_temp.txt
    mv res_b21.root "./res_b21/"$i".root"
    rm input_b21_temp.txt
done
###########################################

你可能感兴趣的:(shell,bash)