This seems like it should be simple, but I can't find any tools that will do it and my attempts at scripting it have failed. Sherlock Google has not been able to assist either.
Here's the deal:
I have a long text file with multiple line breaks. I need to insert more text at the end of every X number of lines (probably 5 or 6 depending on how it changes the flow). The new text is the same in all cases.
I've got Text Wrangler and tried using its grep function. I managed to accomplish this task at the end of every line (which I could have done with a standard find-and-replace).
Basically what I need is this:
line 1.
line 2.
line 3. new text
line 4.
line 5.
line 6. next text.
Is there a way to do this? and how complicated is it?
Thanks All.
Here's the deal:
I have a long text file with multiple line breaks. I need to insert more text at the end of every X number of lines (probably 5 or 6 depending on how it changes the flow). The new text is the same in all cases.
I've got Text Wrangler and tried using its grep function. I managed to accomplish this task at the end of every line (which I could have done with a standard find-and-replace).
Basically what I need is this:
line 1.
line 2.
line 3. new text
line 4.
line 5.
line 6. next text.
Is there a way to do this? and how complicated is it?
Thanks All.