How do I use floating-point arithmetic in bash?

You can’t. bash only does integers; you must delegate to a tool such as bc.

Leave a Comment