Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: list all except
- X-seq: zsh-users 8464
- From: J <jean.chalard@xxxxxxxxx>
- To: Eric Smith <es@xxxxxxxxxxxx>
- Subject: Re: list all except
- Date: Fri, 4 Feb 2005 17:55:46 +0100
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=c/ywT6LOt6SRzkp18dAzRDVP9zb0xFfxwlJ++5AswtDAnO58Unp26XBeaKZ9wonQACw5mvFbH8y3vrEwgXk8j4MOO5UVhNCYyqaPMSqK5FUI4KGELYPHFwqQIfNXfR96PzoXMoBIJNsiys+cOekZCfjdnzYyEzrtwEdgHiqsyPY=
- In-reply-to: <20050204113026.GA4217@xxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050204113026.GA4217@xxxxxxxxxxxx>
- Reply-to: J <jean.chalard@xxxxxxxxx>
> What is the zsh way to select all files except
> those matching a regex?
For a regex, I don't know, but you can select the files that don't
match a glob pattern. The natural way is to follow the pattern with ~
and the pattern that represent the files you don't want.
Suppose you want to match all files except those matching *.pdf :
*~*.pdf
Suppose you want to match *.pdf except t*.pdf, just write
*.pdf~t*.pdf
And that's it.
--
J
"- Wakai ya na...
- Anata yori mo na !" -- Kunisaki Yukito
Messages sorted by:
Reverse Date,
Date,
Thread,
Author