Shell Scripting Tutorial-25: Math On Real Numbers

preview_player
Показать описание
In this tutorial you'll learn to perform arithmetic operations on real numbers using 'bc'
Рекомендации по теме
Комментарии
Автор

the best way to do
a=5
b=5
c=5
d=5
echo “$(($a * ( $b + $c ) /d )) ”

kannu
Автор

Without reverse quotes it works. Below is the code which is running correctly without any error

a=3.5 b=1.1
c= echo $b + $a | bc
echo $c

srikanthgandhi
Автор

just an fy, i did not need the reverse quotes on my ubuntu terminal, it worked without them. (i didnt store the output in any variables)

LastHumansGarage
Автор

this video is outdated please update your content!!

sinistergeek
Автор

Why did 10.5/3.5 give 3 instead of 3.0 though both are floating numbers??

deepakkota
Автор

i am using centos7 this command is not running it's show the error : bc command not found. what i do now

souravprakash
Автор

i got the output but in the side it displays command not found?y

kannu
welcome to shbcf.ru