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

Unsetting Array



Hi,

I'm using ZSH_VERION 4.2.6 on Redhat 5 to test some Korn shell scripts.

Note that /usr/bin/ksh is a link to /bin/zsh

I am unsetting an array like this unset variable[$i] and get

     unset[xxx] variable: invalid element for unset

If I unset it this way ${variable[$i]} I don't get errors but as I expected it did not work.

If I do it with {variable[$i]} I get invalid parameter name.

What is the correct way to unset an array element.

Note that I did do a search and didn't come up with anything..

Regards,

Jerry



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