For a school assignment I need to make a BMI calculator. But it needs to work with decimals. So do any of you know how I make it, so I can type in a decimal on line 4 and 5 and get a decimal result on line 13? Am new to Linux BASH scripting, so all the help I can get will be very appreciated.
1. #!/bin/bash
2. clear
3.
4. read -p "Weight in kilogram: " kg
5. read -p "Lenght in meter: " m
6. clear
7.
8. let total_weight=$kg
9. let total_lenght=$m*$m
10. let BMI=$total_weight/$total_lenght
11. clear
12.
13. echo "Ur BMI is: $BMI"