Mathematical expression in print command in Linux

I can’t get my mistake in this command.

a=2
b=5
c=3
printf "%.2ft" "'$a'+'$c'*'$b'" > ofile.txt

I am getting the value as 50.00. But I should get it 17.00


Source: linux

Leave a Reply