File search using regex

Chris Organ chrisorgan at adam.com.au
Wed Apr 18 18:06:53 CST 2007


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
---- Message sent via Adam Internet WebMail  - http://www.adam.com.au/



More information about the linuxsa mailing list