File search using regex
Thomas Sprinkmeier
thomas.sprinkmeier at gmail.com
Wed Apr 18 22:17:17 CST 2007
On 4/18/07, Chris Organ <chrisorgan at adam.com.au> wrote:
> Hello everyone,
>
> 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.
>
> The test I am searching for is (exactly, including LF) is the following 4 lines:
>
> !D2
> Invoice
> !C
> AUSTALIA EIGHT
>
> Any assistance would be appreciated.
>
> Chris
try the attached perl script.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: findStuff.pl
Type: application/x-perl
Size: 953 bytes
Desc: not available
Url : http://jessica.netcraft.com.au/pipermail/linuxsa/attachments/20070418/1511b16d/findStuff.bin
More information about the linuxsa
mailing list