Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f66f2a commit a02ec4eCopy full SHA for a02ec4e
functions.sh
@@ -0,0 +1,8 @@
1
+#! /bin/bash
2
+
3
+# This is a function file for main.sh
4
5
+function calc {
6
+ result=$(expr $1 + $2)
7
+}
8
main.sh
@@ -0,0 +1,9 @@
+var1=1
+var2=2
+source functions.sh
+# sourcing function files
+calc $var1 $var2
9
+echo $result
0 commit comments