Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: counting in "for" loops
- X-seq: zsh-users 1957
- From: Phil Pennock <phil@xxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: counting in "for" loops
- Date: Thu, 3 Dec 1998 21:26:53 +0000
- In-reply-to: <slrn76c4h1.9s2.mason@xxxxxxxxxxxxxxxxxxxxx>; from "Geoff Wing" on Thu 3 Dec 1998 (4:22 +0000)
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxxx
- Organisation: Organisation? Here? No, over there ---->
- References: <19981202170030.A2789@xxxxxxxxxxxxxxxxx> <slrn76c4h1.9s2.mason@xxxxxxxxxxxxxxxxxxxxx>
Typing away merrily, Geoff Wing produced the immortal words:
> like and use it. It's not as if there aren't a few choices. For starters:
Mostly just variants on a theme. With the problem that they all look to
produce:
12345678910 (with no newline)
% ( local foo; set -A foo {1..10} ; print $foo )
% ( local foo; print ${(A)foo::={1..10}} )
Handle it, without the trailing space of another suggestion.
I wanted:
% print ${(A)_::={1..10}}
which would nicely leave $_ with the values, but _ is a readonly
variable. *sigh*
--
--> Phil Pennock ; GAT d- s+:+ a22 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author