Is the following difference intentional, a bug, or do I miss something?
unset a
set -- "[EMAIL PROTECTED]"
echo $#
Output: 0
typeset a
set -- "[EMAIL PROTECTED]"
echo $#
Output: 1
The man page says, "If the word is double-quoted, ... [EMAIL PROTECTED] expands
each element of name to a separate word. When there are no array
members, [EMAIL PROTECTED] expands to nothing." It doesn't mention a
difference between an empty and an unset variable in this context. As a
quoted 'nothing' normally counts 1 word, the 'nothing' in the first
example appears to be some kind of 'super-nothing'.
Regards,
Bernd
--
Bernd Eggink
[EMAIL PROTECTED]
http://sudrala.de