Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

trivial question



Running this:

var=( "now is" "the time" "for all good" "men to" )

echo var[2] ain\'t nothing
echo var2] ain\'t nothing
echo "var[2]"
echo $var[2]

... I get this:

4 /aWorking/Zsh/Source/Wk 0 $ . test1
ain't nothing
var2] ain't nothing
var[2]
the time


... It hardly matters but I'm curious that 'var[2]' without the dollar sign evaluates to nothing at all.  I have zero need for it to do otherwise still I'm mildly expecting it to just end up as a plain string the same way 'var2]' does.  Seems strange that it evaporates entirely.






Messages sorted by: Reverse Date, Date, Thread, Author