From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27445 invoked from network); 18 Jul 2005 13:01:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Jul 2005 13:01:50 -0000 Received: (qmail 76833 invoked from network); 18 Jul 2005 13:01:43 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Jul 2005 13:01:43 -0000 Received: (qmail 23550 invoked by alias); 18 Jul 2005 13:01:36 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9099 Received: (qmail 23541 invoked from network); 18 Jul 2005 13:01:35 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 18 Jul 2005 13:01:35 -0000 Received: (qmail 75701 invoked from network); 18 Jul 2005 13:01:35 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 18 Jul 2005 13:01:31 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Mon, 18 Jul 2005 13:59:28 +0100 Received: from csr.com ([10.102.144.127]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 18 Jul 2005 14:03:27 +0100 To: zsh-users@sunsite.dk Subject: Re: 1simple? questions In-reply-to: References: Comments: In-reply-to zzapper message dated "Mon, 18 Jul 2005 13:43:27 +0100." Date: Mon, 18 Jul 2005 14:01:30 +0100 Message-ID: <22192.1121691690@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 18 Jul 2005 13:03:27.0165 (UTC) FILETIME=[166126D0:01C58B99] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=ham version=3.0.4 zzapper wrote: > Hi, > Q1 > How can I echo/print an array with a carriage return after each element. Do I > have to use a loop? Just use rc_expand_param: print ${^array}\\r Careful, however: you still get the spaces between elements from "print". You can suppress those by joining the array elements first using print escapes: print ${(pj:\r:)array} (You did mean carriage return, didn't you? You didn't simply want to print one element of the array per line print -l $array ?) pws ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************