lijo george schreef op 01-06-15 om 14:36: > It seems ksh does not treat unset positional parameters like "$1" as > an error while using the "-u" or "nounset" option. [...] > Could someone please confirm whether this is is a bug.
It is. As the POSIX spec says, only "$@" and "$*" are supposed to be exempt from 'set -u' checking, so $1, $2, etc. should not be exempt. I've also confirmed that this is how other current shells act, including bash, dash, mksh, zsh and yash. Older ksh93 versions, at least '1993-12-28 s+', had the opposite bug: $1, $2, etc. were being checked (correctly), but so were "$@" and "$*" (incorrectly). This has necessitated annoying workarounds to get a script to function with "set -u" since you cannot simply do something like: command "$@". But now it looks like they went too far in fixing this issue. Thanks, - Martijn (not a ksh developer) _______________________________________________ ast-developers mailing list ast-developers@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-developers