Suppose I have the following code
for n in {50..300};
do
(( a = 0.3*$n))
#do something
echo $n
echo $a
done
when I run the code, I received an error, it says
((: a = 0.3*50: syntax error: invalid arithmetic operator (error token is ".3*50")
I know it must be because 0.3 or any decimal number isn't recognizable or perhaps due to some formatting issues, as I previously tried ((a = $n / 2)) which worked fine, much appreciated if anyone can give me a hint.