Home » » Shell Scripting Tutorial For Beginners Ten - Perform Arithmetics Operations

Shell Scripting Tutorial For Beginners Ten - Perform Arithmetics Operations

#! /bin/bash  num1=20 num2=5  echo $(( num1 + num2 )) echo $(( num1 - num2 )) echo $(( num1 * num2 )) echo $(( num1 / num2 )) echo $(( num1 % num2 ))   echo $(expr $num1 + $num2 ) echo $(expr  $num1 - $num2 ) echo $(expr  $num1 \* $num2 ) echo $(expr  $num1 / $num2 ) echo $(expr  $num1 % $num2 ) 

0 comments:

Post a Comment

Search

Blog Archive