[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #104682] files whose content matches all given regular expressions

From: anonymous
Subject: [sr #104682] files whose content matches all given regular expressions
Date: Fri, 23 Sep 2005 15:33:43 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 5.5; WinNT)


                 Summary: files whose content matches all given regular
                 Project: grep
            Submitted by: None
            Submitted on: ven 23.09.2005 à 15:33
                Category: None
                Priority: 5 - Normal
                Severity: 1 - Wish
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: address@hidden
             Open/Closed: Open
        Platform Version: None




There is sometimes a need to find all files which contain
several words (in any order, possibly lying on different lines)
(printing matching lines or not).

I think (am i wrong) that this cannot be done with *grep.

Could it be interesting to add that option to egrep ?
I am enclosing a working Perl script as demo.
# mgrep -i gnu author ++ *.c *.h
will retrieve all source files that contain somewhere
the words "gnu" and "author".

This could be implemented as an option (like -a -- "AND")
which will consider words delimitated by bars in regexp
or from an external source (-f) as combined.

Best regards
and thanks you all GNU gurus !
Phil Astiers - address@hidden


Carbon-Copy List:

CC Address                          | Comment
p64 --À-- free --POINT-- fr        | Originator Email


File Attachments:

Date: ven 23.09.2005 à 15:33  Name: mgrep.pl  Size: 1,94Ko   By: None
perl code


Reply to this item at:


  Message posté via/par Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]