Re: Expanding an undefined array

2008-09-24 Thread Chet Ramey
Bernd Eggink wrote: > Is the following difference intentional, a bug, or do I miss something? > > unset a > set -- "[EMAIL PROTECTED]" > echo $# > > Output: 0 This is correct. > typeset a > set -- "[EMAIL PROTECTED]" > echo $# > > Output: 1 The question is how to treat the variabl

Expanding an undefined array

2008-09-24 Thread Bernd Eggink
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