File search using regex
Tim Wegener
twegener at fastmail.fm
Wed Apr 18 23:02:14 CST 2007
Hi Chris,
On Wed, 2007-04-18 at 17:36 +0900, Chris Organ wrote:
> Wondering if someone can assist with regex searches using perl / grep / anything command line. I have lost a severe amount of hair looking for a multi-line search based on exact pattern matching. What I need to do is find this exact header within files within a directory and list them, similar output to using grep -l ie a list.
It looks like someone beat me to it, but since I've done it now, here is
an alternative. (See attachment, with usage explained in the docstring.)
Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multi_grep.py
Type: text/x-python
Size: 1407 bytes
Desc: not available
Url : http://jessica.netcraft.com.au/pipermail/linuxsa/attachments/20070418/18c006d1/multi_grep.py
More information about the linuxsa
mailing list