04-21-04 06:35 AM
On Wed, 21 Apr 2004 at 00:11 GMT, Timur Tabi wrote:
> I currently have the following command:
>
> find . -name "*\.[CH]" | grep -v /src/menu/
>
> This gives me a list of all files that end in .C or .H but do not have
> the string "/src/menu" in them.
>
> This works, but I'm trying to eliminate the call to grep. I need a
> regular expression that combines "*\.[CH]" with "-v /src/menu". I've
> searched for examples on the web and usenet, but I still can't figure
> it out. How do I do a logical-AND with regular expressions?
If you wanted to eliminate by filename, it would be possible; find
matches only on the filename portion, not the full path.
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
========================================
===========================
My code (if any) in this post is copyright 2004, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
[ Post a follow-up to this message ]
|