This is the mail archive of the
mailing list for the Cygwin project.
RE: Regular Expressions from Bash Shell
- From: "Buchbinder, Barry (NIH/NIAID)" <BBuchbinder at niaid dot nih dot gov>
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Wed, 1 Sep 2004 18:07:15 -0400
- Subject: RE: Regular Expressions from Bash Shell
At Wednesday, September 01, 2004 5:17 PM, Igor Pechtchanski wrote:
> On Wed, 1 Sep 2004, Siegfried Heintze wrote:
>> I want to use grep on all the FORTRAN source code files in the
>> current directory whose file names do not contain a "_" character.
>> How do I do this?
>> I'm using the extension of ".f" to designate FORTRAN.
> Disclaimer: this is not a shell programming support forum, and the
> above post is off-topic for this list, since it asks a general shell
> question not related to Cygwin.
> But, since I'm sending this e-mail anyway (and I hope this in no way
> encourages similar future posts):
> find . -name \*_\* -o -name \*.f -print | xargs grep EXPRESSION
I think a "!" was forgotten.
find . \( ! -name \*_\* \) -o -name \*.f -print | xargs grep EXPRESSION
The parentheses may not be needed -- you can try it both ways.
> Again, the above is *not* Cygwin-specific.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html