In a sh shell script.
Given data in a text file:
string1
string2 gibberish
gibberish
string3 gibberish
string4
How could you use awk or sed to remove all lines between string2 (inclusive) and string3 (not including string3)?
to end up with:
string1
string3
string4
you can try this. Anything before “string2” will not be deleted.
output