我正在编写(或尝试编写)一个小程序POSIX sh(遵循 的警告ShellCheck)。 我特别关注关于循环的警告,考虑到双括号,在 POSIX 中该循环是错误的。
POSIX sh
ShellCheck
你能告诉我POSIX sh这段代码的版本是什么:
while (( "$#" )); do case "$1" in [...] esac shift done
shell bash posix
bash ×1
posix ×1
shell ×1