Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: command line perl command to get between lines with non greedy match

by GrandFather (Saint)
on Jan 17, 2020 at 21:54 UTC ( [id://11111552]=note: print w/replies, xml ) Need Help??


in reply to command line perl command to get between lines with non greedy match

A strategy that reads a line at a time and saves lines after PATTERN1 is found until either PATTERN3 is found (and the saved lines are printed), or some other pattern is found and the saved lines are discarded. That may be a bit much to cleanly do as a one liner so bite the bullet and write a script to do the work. The script can be called using a single command line so you haven't lost any convenience of use by writing the script.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
  • Comment on Re: command line perl command to get between lines with non greedy match

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-24 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found