Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to add numbers in linux command line shell

clear
echo Enter 1st number
read a
echo Enter 2nd number
read b
sum=$(( $a + $b ))
 
echo "Sum is: $sum"
 
PREVIOUS NEXT
Tagged: #add #numbers #linux #command #line #shell
ADD COMMENT
Topic
Name
8+2 =