From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16877 invoked from network); 26 Sep 2006 04:24:46 -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=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; 26 Sep 2006 04:24:46 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 7752 invoked from network); 26 Sep 2006 04:24:39 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Sep 2006 04:24:39 -0000 Received: (qmail 20993 invoked by alias); 26 Sep 2006 04:24:30 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10761 Received: (qmail 20983 invoked from network); 26 Sep 2006 04:24:29 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Sep 2006 04:24:29 -0000 Received: (qmail 6273 invoked from network); 26 Sep 2006 04:24:29 -0000 Received: from mx1-1.spamtrap.magma.ca (209.217.78.152) by a.mx.sunsite.dk with SMTP; 26 Sep 2006 04:24:27 -0000 Received: from mail3.magma.ca (mail3.internal.magma.ca [10.0.10.13]) by mx1-1.spamtrap.magma.ca (8.13.1/8.13.1) with ESMTP id k8Q4OOTZ002525 for ; Tue, 26 Sep 2006 00:24:24 -0400 Received: from princo.homelinux.org (ottawa-hs-64-26-147-28.d-ip.magma.ca [64.26.147.28]) by mail3.magma.ca (Magma's Mail Server) with ESMTP id k8Q4ONXA002581 for ; Tue, 26 Sep 2006 00:24:24 -0400 Received: from jrdavid by princo.homelinux.org with local (Exim 3.36 #1 (Debian)) id 1GS4UZ-0008Ls-00 for ; Tue, 26 Sep 2006 00:24:23 -0400 Date: Tue, 26 Sep 2006 00:24:23 -0400 From: Jean-Rene David To: zsh-users@sunsite.dk Subject: Re: Globbing confusion Message-ID: <20060926042423.GA31728@princo> Mail-Followup-To: zsh-users@sunsite.dk References: <20060926.050007.74745714.Meino.Cramer@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20060926.050007.74745714.Meino.Cramer@gmx.de> User-Agent: Mutt/1.5.13 (2006-08-11) X-magma-MailScanner-Information: Magma Mailscanner Service X-magma-MailScanner: Clean * Meino Christian Cramer [2006.09.25 23:15]: > Besides others I want to to match all _directories_ matching the > patterm mc-4.6.1* but dont want to remove _files_ of that pattern. > > And I dont want any errormessage, if a certain directory/file could > not be found. rm -rf mc-4.6.1*(/) The "-f" option to "rm" will take care of the warnings. > For that purpose I tested on the commandline the following > > cd /tmp > ls -ld ertertert(N/) # ertertert does not exist under /tmp When NULL_GLOB is set (as it is when using the "N" glob qualifier), the shell *deletes from the command line* any pattern which generates no match. Your command becomes: ls -ld which prints the entry for the current directory (".") as expected. > In a script I would kill . in that case if "ls -ld" is replaced by > "rm -rf" ??? No you wouldn't. Your command would become: rm -rf which does nothing. -- JR