How to add two numbers in Linux Shell Script | Linux Shell Script
Jun 24, 2021
LinuxShellScript,
455 Views
How to add two numbers in Linux Shell Script | Linux Shell Script
How to add two numbers in Linux Shell Script | Linux Shell Script
We will create a shell script program to add two integer numbers and then print the sum of numbers on the console screen.
#!/bin/bash
num1=110
num2=500
num3=`expr $num1 + $num2`
echo "Sum is: $num3"