I have a text document with 50 URL’s. 1 URL per line. How can I insert a specific keyword every X amount of lines. For example, I need to insert #BREAK# after every 5 lines? I have textpad, notetab pro (text editors) but cannot figure out how to do this? Appreciate any help! Thanks!
That was just an example. I have files with 100,000+ URL’s. I need to insert a keyword every x amount of lines. Cannot be done manually, looking for a macro or way to do this?
just open your text file and insert #break# every five lines.
set TEXT WRAPping to off so you can see the URL in one line.
Report Spam/Abuse
It cannot be done automatically within a text editor, as there is no way for the test editor to count the lines, etc.
One way would be to use a programming language where you can input the file with the urls, and go through the file placing the keyword after x amount of lines. The file is then output with these keywords.
A quick c++ example.
#include
int main() {
using namespace std;
char cur_line[1000]; // assume line is no longer than 999 characters, the last character should be a null ‘