Define local variables within the function.
local [-aAfFgilnrtux] [-p] [name[=value] ...]
The options of the local command are the same as those of the declare command. Please refer to the options of the declare command.
name (optional): variable name or defined function name.
value (optional): The value of the variable.
local returns true unless you provide an illegal option, an assignment error, or use the local command outside a function.
For related examples, please refer to the declare command.
This command is a built-in bash command. For related help information, please check the help command and the corresponding parts of man bash and info bash.
优先推荐相关内容,同时保留你的阅读轨迹和收藏入口。