How to Do Floating Point Math in Linux Bash Scripts

Share
  • November 10, 2023

The Linux Bash shell supports integer arithmetic only. It can neither understand nor cope with floating point calculations. The bc utility gives you precision floating point calculations interactively and in shell scripts.

Source : How to Do Floating Point Math in Linux Bash Scripts