summaryrefslogtreecommitdiffhomepage
path: root/bash.html.markdown
diff options
context:
space:
mode:
authorAdam <adam@adambard.com>2013-10-27 22:18:31 -0700
committerAdam <adam@adambard.com>2013-10-27 22:18:31 -0700
commitdadd4c2a2bf180dccdc74a89a82cfe42db1cedb9 (patch)
tree94db3c6fd5dc197ce303464f5128696e794d56bf /bash.html.markdown
parent7ff3de74fe941a220e6fb3e3e3434d90d0d51cc6 (diff)
parent0c523f4e95ef7dabfbd14a6a90f86035e01f75a4 (diff)
Merged with latest from upstream
Diffstat (limited to 'bash.html.markdown')
-rw-r--r--bash.html.markdown9
1 files changed, 8 insertions, 1 deletions
diff --git a/bash.html.markdown b/bash.html.markdown
index 276bc31f..d208b957 100644
--- a/bash.html.markdown
+++ b/bash.html.markdown
@@ -117,7 +117,7 @@ done
# You can also define functions
# Definition:
-foo ()
+function foo ()
{
echo "Arguments work just like script arguments: $@"
echo "And: $1 $2..."
@@ -125,6 +125,13 @@ foo ()
return 0
}
+# or simply
+bar ()
+{
+ echo "Another way to declare functions!"
+ return 0
+}
+
# Calling your function
foo "My name is" $NAME