2025-03-14 21:59:59 -06:00
|
|
|
# function
|
|
|
|
|
|
|
|
|
|
> Define a function.
|
|
|
|
|
> More information: <https://www.gnu.org/software/bash/manual/bash.html#Shell-Functions>.
|
|
|
|
|
|
|
|
|
|
- Define a function with the specified name:
|
|
|
|
|
|
|
|
|
|
`function {{func_name}} { {{echo "Function contents here"}}; }`
|
|
|
|
|
|
|
|
|
|
- Run a function named `func_name`:
|
|
|
|
|
|
|
|
|
|
`func_name`
|
2025-04-03 20:36:56 -06:00
|
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
|
|
|
|
|
`help function`
|