diff options
author | Adam Bard <github@adambard.com> | 2013-10-27 22:00:26 -0700 |
---|---|---|
committer | Adam Bard <github@adambard.com> | 2013-10-27 22:00:26 -0700 |
commit | 894892a594e356bbca2c7142029bf3bcad959d7f (patch) | |
tree | 11a3e0145b1af98b1db91aa5e7401f2d26488c4c | |
parent | 0762fe034056a59af19cb99437ecd715b0c39c00 (diff) | |
parent | 3bfc820721618af1c1421e2858198bbc739ec70a (diff) |
Merge pull request #385 from alemedeiros/master
[bash/en] add another way to define functions to bash (fix #380)
-rw-r--r-- | bash.html.markdown | 9 |
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 |