mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
add function information for bash
This commit is contained in:
parent
e1c34ca138
commit
182eab6051
@ -115,4 +115,16 @@ do
|
|||||||
echo "$VARIABLE"
|
echo "$VARIABLE"
|
||||||
done
|
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