Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: list all except
- X-seq: zsh-users 8462
- From: Peter Stephenson <pws@xxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: list all except
- Date: Fri, 04 Feb 2005 16:30:50 +0000
- In-reply-to: <20050204113026.GA4217@xxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050204113026.GA4217@xxxxxxxxxxxx>
Eric Smith wrote:
> What is the zsh way to select all files except
> those matching a regex?
(You mean globbing pattern, not regular expression, right?)
Use ^pat, which excludes everything matching pat, or pat1~pat2, which
selects based on pat1, then excludes based on pat2. These require
extendedglob. For example,
setopt extendedglob
print -l ^*.o
You can also "setopt kshglob" and use the ksh forms that bash now
understands. These tend to be clumsier.
See the list of "Glob Operators" in the zshexpn manual page.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author