Re: Quit after certain paragraph



Salve Håkedal wrote:
I want sed (or awk) to quit after the second paragraph
in response to the presence of the word 'second':


Just transfer your words into 'sed':

sed '/second/{:a;n;/^$/!ba;q;}' file.txt

Xicheng

.