Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to add string to end of each array element without loops
- X-seq: zsh-users 15898
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: nix@xxxxxxxxxxxxxxxx
- Subject: Re: How to add string to end of each array element without loops
- Date: Fri, 25 Mar 2011 22:45:11 +0100
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=GIJejhrANBl90b325jFaJRDHtfJco3u+VwNpVY4lMQw=; b=e8BSJqGXylZnV/6qNwXDGVzccZlfe7Zmh+NjERN8fFR8AZir2+3/J5Zy+iUhBaqWnd zhLS+/dIg0aIxWKfwqlfJsGiHomyeYwQ81cpwX4dxca7CRcHo6k7lo4L/LfDRHN5sz18 P9eCGhwPsjRs+5JCjlihYB+dhjy6ewzGBGd5Y=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=X1yp/H8jXwD5pLRF7MVNHI5jyoik1N/kpCDpTFPjgUaAL6jyDifLLb7w8Q5oyT1DKx UKtI/fIh3ju3ud6aZJv4rVHxXqOuIqZKKkxBGgDTE8s5h7RqmLBQiQ1a6Us01ZalTBKV O6a1rXDpviLzyYSjlRnAs4s6CsdnEJd/jjigI=
- In-reply-to: <9861b13e6828d43041a5b489f016664a.squirrel@gameframe.net>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <9861b13e6828d43041a5b489f016664a.squirrel@gameframe.net>
On 25 March 2011 22:32, <nix@xxxxxxxxxxxxxxxx> wrote:
> a=(1 2 3)
> a=(foo$^a[@])
>
> print -l "${(@n)a}"
>
> foo1
> foo2
> foo3
>
> I would like to get the following output instead:
>
> 1foo
> 2foo
> 3foo
a=(${^a}foo) ?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author