From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3174 invoked from network); 23 Feb 2005 18:24:20 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Feb 2005 18:24:20 -0000 Received: (qmail 72997 invoked from network); 23 Feb 2005 18:24:14 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Feb 2005 18:24:14 -0000 Received: (qmail 21596 invoked by alias); 23 Feb 2005 18:24:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20860 Received: (qmail 21582 invoked from network); 23 Feb 2005 18:24:08 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Feb 2005 18:24:08 -0000 Received: (qmail 72682 invoked from network); 23 Feb 2005 18:24:08 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 23 Feb 2005 18:24:03 -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 ; Wed, 23 Feb 2005 18:22:33 +0000 Received: from csr.com ([10.102.144.127]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 23 Feb 2005 18:24:58 +0000 To: zsh-workers@sunsite.dk Subject: Re: POSIX conformance in coreutils In-Reply-To: Message from Oliver Kiddle of "Wed, 23 Feb 2005 17:36:03 +0100." <22172.1109176563@trentino.logica.co.uk> References: <200501121027.j0CAR12W018808@news01.csr.com> <200501121558.j0CFwgeq026991@news01.csr.com> <22172.1109176563@trentino.logica.co.uk> Date: Wed, 23 Feb 2005 18:24:02 +0000 Message-ID: <2940.1109183042@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 23 Feb 2005 18:24:58.0637 (UTC) FILETIME=[FB186BD0:01C519D4] X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.5 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.5 Oliver Kiddle wrote: > Would it perhaps be easier to just use something like this: > > tail() { > local arr > arr=( ${(f)"$( print -lr -- $arr[${1:--10},-1] > } > > It's shorter and potentially tests other zsh features as a side-effect > (such as emulating /dev/fd in redirections). I don't think /dev/fd is currently faked to that extent. There's special handling for tests, and /dev/fd is sometimes used to *implement* process substitution, but it won't handle it specially there. You could build up arr some other way, of course. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** 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. **********************************************************************