From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27229 invoked from network); 16 Aug 2006 04:49:04 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Aug 2006 04:49:04 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 24981 invoked from network); 16 Aug 2006 04:48:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Aug 2006 04:48:56 -0000 Received: (qmail 29334 invoked by alias); 16 Aug 2006 04:48:48 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10611 Received: (qmail 29320 invoked from network); 16 Aug 2006 04:48:47 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Aug 2006 04:48:47 -0000 Received: (qmail 23873 invoked from network); 16 Aug 2006 04:48:47 -0000 Received: from web8403.mail.in.yahoo.com (202.43.219.151) by a.mx.sunsite.dk with SMTP; 16 Aug 2006 04:48:45 -0000 Received: (qmail 44534 invoked by uid 60001); 16 Aug 2006 04:48:42 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Sv90Briahh9fLqO+BBsUmXhXIwZccSvwaY3zQMrPseueF6P6pTO1faJVgSi5xJNecxKI9MsDwT4xAGHK5O3+DJhFBY8rwC80zhcKY9zGCxd0EWXwf2fkFlADdJk1Ew5FB8LL5ZEl0KuqXIuNrCMKgKpzl2FzGSYUeXSvsoAHrr0= ; Message-ID: <20060816044842.44532.qmail@web8403.mail.in.yahoo.com> Received: from [59.144.61.86] by web8403.mail.in.yahoo.com via HTTP; Tue, 15 Aug 2006 21:48:42 PDT Date: Tue, 15 Aug 2006 21:48:42 -0700 (PDT) From: sac Subject: The amazing array feature in zsh To: Zsh users list MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit The array subject in zsh is too huge and fascinating. I discovered this amazing feature of array recently, assigning values just like we do in some high level language. Here is a example, files=() # initialize to null for mfile in `svn stat $1 | grep '^M' | awk '{ print $2 }'` do files+=($mfile) done print -c $files # print with tabs Notice tha assignment to the array variable +=. And actually this can be iterated like, for file in $files do done I dont know if any other shell provides similar feature, but this one is too good and useful, and makes the use of array in shell very easy. But I dont think this is documented in zsh, atleast I couldn't find it. Regards sac. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com