From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7883 invoked from network); 18 Sep 2006 16:40:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Sep 2006 16:40:19 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 67366 invoked from network); 18 Sep 2006 16:40:13 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Sep 2006 16:40:13 -0000 Received: (qmail 4485 invoked by alias); 18 Sep 2006 16:40:04 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10732 Received: (qmail 4473 invoked from network); 18 Sep 2006 16:40:03 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 18 Sep 2006 16:40:03 -0000 Received: (qmail 65973 invoked from network); 18 Sep 2006 16:40:03 -0000 Received: from p54852b3b.dip0.t-ipconnect.de (HELO localhost) (84.133.43.59) by a.mx.sunsite.dk with SMTP; 18 Sep 2006 16:40:01 -0000 Received: from localhost ([127.0.0.1]) by localhost with esmtp (Exim 4.60) (envelope-from ) id 1GPMA4-00047J-4B for zsh-users@sunsite.dk; Mon, 18 Sep 2006 18:40:00 +0200 Date: Mon, 18 Sep 2006 18:39:59 +0200 (CEST) Message-Id: <20060918.183959.74746293.Meino.Cramer@gmx.de> To: zsh-users@sunsite.dk Subject: OT: How to list all but the last item From: Meino Christian Cramer X-Mailer: Mew version 5.1 on Emacs 21.4 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, may be this is a very stupid question...and may be I am blind... But... I want to contruct a loop like for i in `` do ${i} done and should return a list of items matched by a regexp or another kind of qualifier and skipping the last item. Example: ls -rtlc * | would return every item in a directory exept the newest one. Is there any way to accomplish with something fitting in on a commandline??? Thanks a lot for any hepl in advance! Keep zshing! mcc