declare: add function print example and update link (#15223)

This commit is contained in:
Managor
2024-12-26 20:14:25 +02:00
committed by GitHub
parent 4f6fb6b173
commit 74cb1d7345

View File

@@ -1,7 +1,7 @@
# declare # declare
> Declare variables and give them attributes. > Declare variables and give them attributes.
> More information: <https://www.gnu.org/software/bash/manual/bash.html#Bash-Builtins>. > More information: <https://www.gnu.org/software/bash/manual/bash.html#index-declare>.
- Declare a string variable with the specified value: - Declare a string variable with the specified value:
@@ -26,3 +26,7 @@
- Declare a global variable within a function with the specified value: - Declare a global variable within a function with the specified value:
`declare -g {{variable}}="{{value}}"` `declare -g {{variable}}="{{value}}"`
- Print a function definition:
`declare -f {{function_name}}`