[X-Unix] Re: X-Unix Digest, Vol 4, Issue 5

James Bucanek subscriber at gloaming.com
Thu Dec 23 11:56:36 PST 2004


Eugene wrote on Thursday, December 23, 2004:

>On Thu, Dec 23, 2004 at 06:34:17PM +0100, Peter Dyballa wrote:
>: 
>: Am 23.12.2004 um 16:55 schrieb 
>: x-unix-request at listserver.themacintoshguy.com:
>: 
>: >    rm -rf /Library/Fonts/*
>: >
>: >...and have it ONLY delete stuff in the directory that DOES NOT begin
>: >with "MS"?
>: 
>: rm -rf /Library/Fonts/[^Mm][^Ss]*
>: 
>: Check with ls -l /Library/Fonts/[^Mm][^Ss]*
>
>I don't think that works, unless the shell suddenly understands regular
>expressions...

The shell doesn't understand regular expressions.  But globbing does understand a few wildcards (?, *, and [...]) which look suspiciously like regular expressions.  The globbing pattern

    [^Ss]*

is not a regex patter.  The equivalent regex would be

    [^Ss].*

James

-- 
James Bucanek <mailto:privatereply at gloaming.com>


More information about the X-Unix mailing list