I have a text file generated by a weather forecasting program.
It has alot of data that doesn't work with a PHP script I use, so I need to delete it out manually.
What I need to do is automate this somehow - I need it to delete everything before a certain block of text that is always the same. The line that is always the same is " WXSIM text forecast for Glendale". So everything before that is deleted, and everything after stays.
Donnie thinks it makes him look like Doc Savage or an Oscar, etc.
The orange bronzer he slathers on looks more yellow in the very bright lights of TV productions like The Apprentice, etc. And it's why he dyes his ridiculous thinning gray comb-over yellow, surrounds himself with the most gaudy nouveau riche gilt trash, etc.
Question
Mr. Black
Hi guys,
I have a text file generated by a weather forecasting program.
It has alot of data that doesn't work with a PHP script I use, so I need to delete it out manually.
What I need to do is automate this somehow - I need it to delete everything before a certain block of text that is always the same. The line that is always the same is " WXSIM text forecast for Glendale". So everything before that is deleted, and everything after stays.
Any ideas or solutions?
Thanks! :-)
Link to comment
https://www.neowin.net/forum/topic/1356748-scriptingautomating-editing-a-text-file/Share on other sites
3 answers to this question
Recommended Posts