Pattern: Use of undefined local
flag
Issue: -
local
is supported in many shells, including bash, ksh, dash, and BusyBox ash. However, strictly speaking, it's not POSIX.
Example of incorrect code:
myfunc() {
local i=0
..
}
Example of correct code:
myfunc() {
_myfunc_i=0
..
}