mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-06 23:06:49 +02:00
add function information for bash
This commit is contained in:
@@ -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
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user