From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12542 invoked by alias); 25 Mar 2011 21:47:42 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15897 Received: (qmail 28892 invoked from network); 25 Mar 2011 21:47:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at myproxylists.com designates 217.119.39.74 as permitted sender) X-Originating-IP: 127.0.0.1 Message-ID: In-Reply-To: References: <9861b13e6828d43041a5b489f016664a.squirrel@gameframe.net> Date: Fri, 25 Mar 2011 23:47:40 +0200 Subject: Re: How to add string to end of each array element without loops From: nix@myproxylists.com To: "Mikael Magnusson" Cc: zsh-users@zsh.org User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal > On 25 March 2011 22:32, 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 > Worked, thank you. For some reason subscripts are giving to me headaches. Maybe I should ghet more fresh air to clear my head out :)