sed – Stream Editor for filtering and transforming text
View text/content between two words:
sed -n "/START-WORD-HERE/,/END-WORD-HERE/p" input-file > output-file
-n : suppress automatic printing of pattern space
p : print the current pattern space
Extract a range of lines from a text file:
sed -n LineNumber1,LineNumber2p filename
Ex: sed -n 155,159p filename > newfile