vault backup: 2024-05-30 18:37:47
This commit is contained in:
parent
a4047ae9fe
commit
0982446c7a
@ -128,8 +128,14 @@ function_name () {
|
||||
```
|
||||
|
||||
To return a value from a function, use the `return` keyword. After calling, it'll be assigned to the global variable `$?`.
|
||||
```bash
|
||||
my_function () {
|
||||
return 55
|
||||
}
|
||||
|
||||
```
|
||||
my_function
|
||||
# Will echo 55
|
||||
echo $?
|
||||
```
|
||||
## Commands
|
||||
| Command | Description |
|
||||
|
Loading…
Reference in New Issue
Block a user