The question is.
I have a file. I search it for a string. I want to delete the line with the string as well as the lines following it until a get to another set string.
Example: I am searching for "Sun". I want to delete the line with "Sun" and everything following it until I get to "System Type" again. The file will look like this..
System Type: Sun
OS: Solaris
Version: 9
System Type: Dell
OS: Windows
Version: XP
CPUs: 2
System Type: HP
OS: HPUX
Version: ?
CPUs: 6
Memory: 64GB
The kicker is the number of lines after "Sun" may vary which is why I need to delete everything until I get to the string "System Type" again.
I have a file. I search it for a string. I want to delete the line with the string as well as the lines following it until a get to another set string.
Example: I am searching for "Sun". I want to delete the line with "Sun" and everything following it until I get to "System Type" again. The file will look like this..
System Type: Sun
OS: Solaris
Version: 9
System Type: Dell
OS: Windows
Version: XP
CPUs: 2
System Type: HP
OS: HPUX
Version: ?
CPUs: 6
Memory: 64GB
The kicker is the number of lines after "Sun" may vary which is why I need to delete everything until I get to the string "System Type" again.