I am writing a script in zsh shell, it fetchs a number from a file using the awk command, store it as a variable, which in my case is a small number 0.62000. I want to change this number by multiplying it by 1000 to become 620.0 using the command in the script
var2=$((var1*1000))
trouble is when the script is run it returns the error message
0.62000: syntax error: invalid arithmetic operator (error taken is ".62000")
I have also tried the following variations, but none of them works
var2=$var11000
var2=$var11000 | dc
Could someone tell me what is wrong?
Thanks