Loading, please wait...

A to Z Full Forms and Acronyms

How to add two numbers in Linux Shell Script | Linux Shell Script

Mar 07, 2022 LinuxShellScript, 7297 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"
A to Z Full Forms and Acronyms