From 182eab60517e571931d7b928c28fb88a88fca894 Mon Sep 17 00:00:00 2001 From: alexandre medeiros Date: Sun, 22 Sep 2013 11:28:59 -0300 Subject: [PATCH] add function information for bash --- bash.html.markdown | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 ```