Search Results

Search: Posts Made By: surendran
17,765
Posted By surendran
Command line arguments for addition
Please try the code below:

add=0
for i in $*
do
add=`expr $i + $add`
done
echo "sum is : $add"

sh a 12 32 14 25
sum is : 83


Please view this code tag video...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 12:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy