Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by GrandFather (Sage)
on Jan 17, 2020 at 21:54 UTC ( #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
Node Status?
node history
Node Type: note [id://11111552]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2020-09-18 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (112 votes). Check out past polls.

    Notices?