Hello fellow monkers,
I'm trying to solve a simple problem: grep some multiple bigs files having different separator pattern with the same matching rule and output the corresponding block (not only the line). Some sort of grepmail but for any kind of text file.
To be more explicit, the input files could contained multiple blocks like:
case 1:
case 2:header1=val1 header2=val2 data
header1: val1 header2: val2 data
in case 3, like or not previous ones but with a separator line like '^-=+$'
matching rules need to be customized each time. input files could be hundrer with size in Gigabytes. performance needs to be acceptable :)
For now, except manual parsing, the only relevant module that I found is Parse::File::Metadata (1). Has anyone some hints of modules or else to manage this ?
thanks a lot.
Cheers
(1) http://search.cpan.org/~jkeenan/Parse-File-Metadata-0.04/lib/Parse/File/Metadata.pm
In reply to parse file per customized separator / block / metadata by raiten
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |