Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Globbing confusion
- X-seq: zsh-users 10763
- From: Meino Christian Cramer <Meino.Cramer@xxxxxx>
- To: jrdavid@xxxxxxxx
- Subject: Re: Globbing confusion
- Date: Wed, 27 Sep 2006 04:35:19 +0200 (CEST)
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20060926042423.GA31728@princo>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060926.050007.74745714.Meino.Cramer@xxxxxx> <20060926042423.GA31728@princo>
From: Jean-Rene David <jrdavid@xxxxxxxx>
Subject: Re: Globbing confusion
Date: Tue, 26 Sep 2006 00:24:23 -0400
> * 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
>
Hi JR,
thanks a lot for your explanations! :)
Have a nice day!
mcc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author