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

Re: for loop question



> I've fiddled around with various modifications but it seems to dislike "
[ -n "$TLC[i]" ] "
> even though the 'while' loop is happy with it.  That expression evaluates
to true or
> false, does it not? So why won't 'for' swallow it?

The double parents (( )) are special arithmetic syntax.  You can't use an
ordinary shell command like "test" ( for which "[" is an alias) inside that
construct.


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