Bc: File is unavailable

Hello, Unix-Forum!

Yet another problem:

var=1.5
bc $var + 3.2

results in

File 1.5 is unavailable

So I must be doing something wrong but I don't know what.

intelinside

The message tells you that bc expects to read a file, but that "1.5" is not a file. Try:

echo "$var + 3.2" | bc

Yes! Thank you!