mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
add function information for bash
This commit is contained in:
parent
e1c34ca138
commit
182eab6051
@ -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
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user