Shell Scripting Tutorial-24: Operator Precedence

preview_player
Показать описание
In this tutorial you'll learn to evaluate arithmetic expressions against the regular rules of precedence using parentheses.
Рекомендации по теме
Комментарии
Автор

Tnx man for your effort! I learnt a lot!

jndrgr
Автор

So the terminal uses PEMDAS. I never thought algebra will ever help me. Thank You.

TheMusicanGamer
Автор

@atul verma, your variables are case sensitive.  Your problem is fixed by changing your first line variables to uppercase "A" and '"B. "

lorandf
Автор

Hii I am stuck on video 24. Could you please help me with reverse quote. How to type in reverse quote.

swetarai
Автор

When ever I execute the file with (echo "i have started" ; sleep 3; echo woke up;
sh $1
a=30 b=15
echo `expr $b - $a`), after shouwing woke up, it goes into super user mode. When I exit from the super user mode, then shell executes b - a is this happening like this

Sree-qrib
Автор

hai madhu !.. expr is not working in my ubuntu :(

venkatasaicharanputrevu
Автор

hello madhur..when i have ran above programme on the termianl..output like this
expr $a + $b
expr $a - $b
expr $a * $b
expr  $a / $b
expr $a % $b
...whats the solution

sathiram
Автор

Hi i tried this in my system it not came could you please help me

udaykumardabbeeru
Автор

The stuff that wasn't taught in an elementary school starts at 3:46

Jotainkivaa
Автор

the expr which u stated now is not working

kannu
Автор

remove the space around the '='

stephen_dav
Автор

try this format
a=10 b=10 c=1 d=12
echo $(( a * (b * c) / d))

vikasthota
Автор

remove the space around the '='

stephen_dav
welcome to shbcf.ru