[HPADM] RE: tricky regular expression

From: Chris O'Donnell (chris.odonnell@openwave.com)
Date: Mon Feb 24 2003 - 14:43:48 EST


Might not be what your are looking for but how about doing a

find ./ -type f | egrep -v EXCLUDE

-----Original Message-----
From: hpux-admin-owner@DutchWorks.nl
[mailto:hpux-admin-owner@DutchWorks.nl]On Behalf Of Paveza, Gary
Sent: Monday, February 24, 2003 1:27 PM
To: 'HP9000 Admin'
Subject: [HPADM] tricky regular expression

I need to write a regular expression which will match against all files on
my system, except for files located in particular directories. The good
thing is that the directories all follow the same pattern. Basically, I
need to exclude from the expression any filename which has in the second
section of it's name, the string EXCLUDE (delimited). Seems pretty easy to
write an expression which selects these values, but more difficult to pick
one that excludes only these. Of course, it might just be a long day too.

Any ideas?

/ all files selected
/stand all files selected
/var all files selected
/uXXX/EXCLUDE/ files in this directory excluded
/uAAA/EXCLUDE/ files in this directory excluded.

---------------------------------------------------------
Gary Paveza, Jr.
Senior Systems Administrator
(302) 252-4831 - phone
(302) 377-1516 - cell

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact
majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner:
owner-hpux-admin@dutchworks.nl
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse
only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse &
search)
--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:26 EDT