Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

Bash maths

This revision card explains Bash maths. It starts from the need that integers with $(( )). It describes compare with (( )). The how-to section notes decimals need bc. An example on the card is exit code in $?

Bash maths Integers with $(( )). Compare with (( )). Decimals need bc. Exit code in $?.
Bash maths · Download PNG
Read card text

What this card says

Why do we need it?

Integers with $(( )).

echo $((a+b))

What is it?

Compare with (( )).

(( n > 5 ))

How to do it

Decimals need bc.

echo 'scale=2;10/3' | bc

Example

Exit code in $?.

echo $?

See all AWS revision cards