Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Text File Section Extractor

by jdporter (Canon)
on Apr 10, 2009 at 14:26 UTC ( #756834=note: print w/replies, xml ) Need Help??


in reply to Text File Section Extractor

perl -ne "/begin expr/ .. /end expr/ and print" infile > outfile

It should be pointed out that this will extract as many occurrences of a matching block as there are in the file, not just the first, not just the largest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://756834]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2020-01-22 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?