I am trying to write a code that will calculate the radius and area of a circle using pi and the circumference. When I try to run my code, I receive an error message that says
main.sh: line 5: bc: command not found main.sh: line 7: bc: command not found
Could you please advise me on where I went wrong, and help me to fix my code?
#!/bin/bash pi=3.14; circumference=5; echo "$circumference" radius=$(echo "$circumference" \* 2 \* "$pi" |bc -l); echo "$radius" area=$(echo "$pi" \* "$radius" \* "$radius" |bc -l); echo "$area" echo "The radius of a circle is $radius"; echo "The area of a circle is $area"; exit