This is a simple Shell script for Adding 2 Numbers' by calling Function.
Program Code:
#!/bin/bash
#Function definition
function sum()
{
x=`expr $1 + $2`
echo " $x"
}
#Calling the function
sum 5 3
echo " The sum of 4 and 7 is : `sum 4 7`"
Program Output:
Post a Comment