diff options
author | alexandre medeiros <alexandre.medeiros@students.ic.unicamp.br> | 2013-09-22 11:28:59 -0300 |
---|---|---|
committer | alexandre medeiros <alexandre.medeiros@students.ic.unicamp.br> | 2013-09-22 11:28:59 -0300 |
commit | 182eab60517e571931d7b928c28fb88a88fca894 (patch) | |
tree | f4367118b23ed12b66e30e6b29ac0be17550a0e6 | |
parent | e1c34ca138cc1a978a85ba5062bed47219ac2d1c (diff) |
add function information for bash
-rw-r--r-- | bash.html.markdown | 12 |
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 ``` |