Hi,
I'm trying to strip all lines between two headers in a file:
### BEGIN ###
[Header 1]
Text to remove, contains all kinds of characters
...
Antispyware-Downloadserver.com (Germany)=http://www.antispyware-downloadserver.c
om/updates/
Antispyware-Downloadserver.com #2 (Germany)=http://www.antispyware-downloadserve
r.com/updates/
ComputerFixerTools.com (USA)=http://67.202.99.48/spybot/
Evertje Networks (Europe)=http://sbsd.mirror.evertjenetworks.nl/files/updates/
FastSpeedTest.com (USA)=FastSpeedTest.com - Test your Internet Speed and find out how to speed it up!
...
[Header 2]
More stuff, more headers
### END ###
I've tried several different sed commands, and the results have been either nothing is removed, or the line [Header 2] is removed as well.
Sorry, I haven't saved a list of what I've tried; here is my most recent failed attempt though:
sed -e '/\[Header\ 1\]/,/\[Header\ 2\]/ { /^\[Header\ 2\]$/!d }
Any help would be appreciated, and thank you in advance =)