Merge pull request #385 from alemedeiros/master

[bash/en] add another way to define functions to bash (fix #380)
This commit is contained in:
Adam Bard 2013-10-27 22:00:26 -07:00
commit 894892a594

View File

@ -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