So I have a text file and it contains useless info, (to me at least ), after a certain point. How could I delete the remainder of the file contents from a file at a point when a specific line is found?
For example I have a file called checkme.txt
Lines 1-25 contain the info I need to extract
Line 26 contains a line that reads, "Useless info from here down"
Lines 27 and beyond need to be deleted and the file saved as checkme.txt but with the data deleted.
Seems simple but for some reason I cannot accomplish it
For example I have a file called checkme.txt
Lines 1-25 contain the info I need to extract
Line 26 contains a line that reads, "Useless info from here down"
Lines 27 and beyond need to be deleted and the file saved as checkme.txt but with the data deleted.
Seems simple but for some reason I cannot accomplish it