Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Append string to every element in a list?
- X-seq: zsh-users 12651
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: "Richard Hartmann" <richih.mailinglist@xxxxxxxxx>
- Subject: Re: Append string to every element in a list?
- Date: Thu, 28 Feb 2008 02:28:10 +0100
- Cc: "zsh users" <zsh-users@xxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=yOepOBJf83spfiNqspj4VgNWx8FlhflYCaEWR/WennQ=; b=nqnxJe5wijKTdsPioz9pAxFr/A0xBfMnkqZr99rGtzNcgGfQscQhplGLzJXyB/ezJZRsWYVj4Zu4mgpKmHywNZJ/ApLpoG/Ov/qksbmddU6xucWtuSX7j5ki0UJvuXIlr08xjN2fZuAhvCNc2zuiTxhSvbQyNGcQUY5dqnTiPmY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=r2151utQ7dzD6LjIXPSbHcVK/imx5LdN+RLCshTZcomFK3cKTf9/Fy/5Y+8FS2GweqL0NqzcB2JmPkc1ltI/RZALtucF9RxTQC1dpksZhjCh7VLLaeHINZ/45Z19zJNfG5tkanovZdpygcvEK6vzxYHJDIOmrizCAcKv+lttYAU=
- In-reply-to: <2d460de70802271722i5a42de50j67093c1740ae2584@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2d460de70802271722i5a42de50j67093c1740ae2584@xxxxxxxxxxxxxx>
On 28/02/2008, Richard Hartmann <richih.mailinglist@xxxxxxxxx> wrote:
> Hi all,
>
> I have a program that returns
>
> a b c d e [...]
>
> and would need to append foo to every single element. Maybe
> it's the time of day, but I can't figure out how to do this atm,
> even though it should be trivial..
Maybe something like this
% a=($(echo a b c))
% print -l $a
a
b
c
% print -l ${^a}foo
afoo
bfoo
cfoo
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author