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.
In reply to Re: command line perl command to get between lines with non greedy match
by GrandFather
in thread command line perl command to get between lines with non greedy match
by ravi_perl_monks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |