我知道 Bash 和 Zsh 支持local变量,但有些系统只有 POSIX 兼容的 shell。并且local在 POSIX shell 中未定义。
local
所以我想问一下哪些shell支持local关键字定义局部变量?
编辑:关于外壳我的意思是默认/bin/sh外壳。
/bin/sh
shell shell-script
shell ×1
shell-script ×1