From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17695 invoked from network); 12 Jul 2004 14:35:33 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 12 Jul 2004 14:35:33 -0000 Received: (qmail 16425 invoked from network); 12 Jul 2004 14:38:47 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Jul 2004 14:38:47 -0000 Received: (qmail 23826 invoked by alias); 12 Jul 2004 14:34:52 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7688 Received: (qmail 23816 invoked from network); 12 Jul 2004 14:34:51 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 12 Jul 2004 14:34:51 -0000 Received: (qmail 15353 invoked from network); 12 Jul 2004 14:38:12 -0000 Received: from madrid10.amenworld.com (62.193.203.32) by a.mx.sunsite.dk with SMTP; 12 Jul 2004 14:37:59 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i6CEWUc24082; Mon, 12 Jul 2004 16:32:31 +0200 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1Bk1re-0000eW-00>; Mon, 12 Jul 2004 16:33:06 +0200 Date: Mon, 12 Jul 2004 16:33:06 +0200 From: DervishD To: Klaus Wacker Cc: ZSH User List Subject: Re: Maildir empty? Message-ID: <20040712143306.GB2502@DervishD> Mail-Followup-To: Klaus Wacker , ZSH User List References: <20040712073705.GN2860@born.physik.uni-dortmund.de> <690.1089625465@trentino.logica.co.uk> <20040712124144.GO2860@born.physik.uni-dortmund.de> <20040712132221.GA818@DervishD> <20040712140900.GP2860@born.physik.uni-dortmund.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040712140900.GP2860@born.physik.uni-dortmund.de> User-Agent: Mutt/1.4.2.1i Organization: Pleyades X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi Klaus :) * Klaus Wacker dixit: > > > > Does this do what you want: > > > > if [ -z $i/*/*([1]) ] > > > > You need to use the single brackets so that the $i/*/* is treated as a > > > > filename expansion. > > Why are single brackets needed here instead of [[ -z ... ]]? Why > > with single brackets the $i/*/* construction is treated as a filename > > expansion? Is it not using double brackets? > I can only give a partial answer. `[' is treated like any other > command, so its arguments are subject to filename expansion. Yes, I know, it happens even with the builtin '['. >`[[...]]' is a real shell construct with its own syntax and rules. > Don't ask me what exactly the rules are, but essentially they are > geared more towards pattern matching than file globbing, if I > remember correctly. OK, that's a good explanation :)) Thanks a lot! Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/