summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bash.html.markdown12
1 files changed, 12 insertions, 0 deletions
diff --git a/bash.html.markdown b/bash.html.markdown
index 4a290358..ed93d58b 100644
--- a/bash.html.markdown
+++ b/bash.html.markdown
@@ -115,4 +115,16 @@ do
echo "$VARIABLE"
done
+# You can also define functions
+# Definition:
+foo ()
+{
+ echo "Arguments work just like script arguments: $@"
+ echo "And: $1 $2..."
+ echo "This is a function"
+ return 0
+}
+
+# Calling your function
+foo "My name is" $NAME
```