created shell dir

This commit is contained in:
2025-02-23 15:43:13 +00:00
parent b1f506bbd9
commit 4372a9042b
14 changed files with 0 additions and 0 deletions

25
shell/function.sh Normal file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
function addition {
local FIRST=$1
local SECOND=$2
let RESULT=FIRST+SECOND
echo "Result is: $RESULT"
let FIRST++
let SECOND++
return $RESULT
}
#do the addition of two numbers
echo -n "Enter first number: "
read FIRST
echo -n "Enter second number: "
read SECOND
addition $FIRST $SECOND
echo "RETURN: $?"
echo "Printing variable:"
echo "FIRST: $FIRST"
echo "SECOND: $SECOND"