I'm trying to write a bash script that displays temperatures in Celsius and then converts and displays it to Fahrenheit. I keep getting an operand error at the line of the Fahrenheit equation. Is it a little thing that I'm missing?
#!/bin/bash
cels = 0
fahr = 0
echo -e "Celsius\t\tFahrenhiet"
echo "--------------------------"
while [[ $cels -le 25 ]]
do
fahr =$(( ($cels) * 9/5 + 32)) <---operand expected error here
echo -e $cels "\t\t" $fahr
((cels++))
done
Thanks for any help in advance, I'm new to bash and am having a lot more trouble with it than other languages.