you could use bc instead : echo $b-$a | bc. On the command line expr 3.2 - 2 gives the same result. It seems that expr can't take float: see unix.stackexchange.com/questions/165165/…
As per the remarks added by a helpful person to your later question here, we do expect you to interact with people who assist you. I have upvoted the post below, and downvoted your post.
bcinstead :echo $b-$a | bc. On the command lineexpr 3.2 - 2gives the same result. It seems that expr can't take float: see unix.stackexchange.com/questions/165165/…