Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Reverse the order of an array?
- X-seq: zsh-users 4670
- From: Steve Talley <stephen.talley@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Reverse the order of an array?
- Date: Fri, 8 Feb 2002 17:17:40 -0700
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <Pine.BSF.4.40.0202082359000.90676-100000@xxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxx on Sat, Feb 09, 2002 at 12:09:37AM +0000
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20020208165535.D10334@thpppt> <Pine.BSF.4.40.0202082359000.90676-100000@xxxxxxxxxxxxxxxx>
Perfect! I knew there was a better solution.
Thanks Bart!
Steve
Bart Schaefer wrote:
> On Fri, 8 Feb 2002, Steve Talley wrote:
>
> > Thanks Bart. The best that I had come up with was:
> >
> > indexes=({$#osvers..1})
> > tmp=('$osvers['$^indexes']')
> > osvers=${(e)tmp}
> >
> > Do you see any way (other than skipping the whole thing :) to simplify
> > this?
>
> Hmm, I should have thought of that.
>
> eval osvers\=\( \"\$osvers\[{$#osvers..1}\]\" \)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author