4 ms·
> in violation of the POSIX standard. local is not in violation of the POSIX standard; it's listed there precisely because it's known extension. The behavior i
by kazinator 5y ago
> in violation of the POSIX standard.
local is not in violation of the POSIX standard; it's listed there precisely because it's known extension. The behavior is unspecified; the shells are free to specify it.
- chasil 5y agoWell then, by all means, feel free to use [[ and function. What you write will not run in Almquist or other POSIX shells, but don't let that stop you... until it does. For the practical concern of portability, none of these are compliant, no matter our protests otherwise. They fail. "The following words may be recognized as reserved words on some implementations (when none of the characters are quoted), causing unspecified results: [[, ]], function, select."