I have a file as below.~PAR1~This is Par1 line 1This is Par1 line 2Par Finished~PAR2~This is Par2 line 1This is Par2 line 2Par FinishedIf I pass PAR1, I should get all lines between PAR1 and Par Finished line. How can I get it? I was looking into awk and sed and couldn't find any options.
how to extract a portion of text from a file between matched conditions
text processing;sed;awk