So, I'm writing a script and I have a text file like this:
blahblahblahdeleteme
<!-- post -->
This is the text I want to keep! Pick me!!
<!-- post navigation -->
more text please delete me I am not needed....
I would like to delete the first and last parts (and the marker, if easily done) and keep the text in the middle.
Now, I know bash isn't usually the best for parsing text like this, but since it's simple I thought I might as well stick with using bash. Is this as easy as I think it should be?
I found this post: split text file in two using bash script
I could split it into two text files then into two more and just keep the middle one. Is that my best bet? Please let me know!