Tags

, , , , , ,

The following CLI one-liner prints all the lines between the lines containing PATTERN1 and PATTERN2 (including the lines with these two patterns) in a file, FILENAME:

sed -n '/PATTERN1/,/PATTERN2/p' FILENAME
Advertisements