ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Post New Requests Here

Delete All Text In File Until Particular String


Wondering how one might delete all text up until finding a particular text string.

Suppose the text string is “WXYZ”.

And suppose there are around 100 lines above the “WXYZ” line.

Too, suppose we have 1000 files to do this to.

Any suggestions appreciated.

Nicholas Kormanik

Use sed, the Stream EDitor, known from Linux, but also available for Windows. And here is a SO answer with details

The Windows download can be found here:

Thanks Ath.  Sed it is, then.


[0] Message Index

Go to full version