HoustonGuy
Programmer
I'm trying to get the logic right to read lines in a text file and only write certain lines to a new file. Once I find a specific line, I want to stop writing to the new file until another specific line is found.
The text file is like this:
A-Line A here
B-Line B here
C-Line C here
D-Line D here
E-Line E here
F-Line F here
G-Line G here
H-Line H here
I want the new file I wrote to to skip lines C thru G.
The new file would be:
A-Line A here
B-Line B here
H-Line H here
Although I've parsed plenty of times, I can't seem to get the logic correct to stop writing and pick up writing again to the text file.
Basic and stupid, so I appreciate the help.
The text file is like this:
A-Line A here
B-Line B here
C-Line C here
D-Line D here
E-Line E here
F-Line F here
G-Line G here
H-Line H here
I want the new file I wrote to to skip lines C thru G.
The new file would be:
A-Line A here
B-Line B here
H-Line H here
Although I've parsed plenty of times, I can't seem to get the logic correct to stop writing and pick up writing again to the text file.
Basic and stupid, so I appreciate the help.