The original file would be:
line 1
line 2
line 3
line 4
line 5
.
.
.
line N
and I want to append some text (e.g."word") every X lines until the end of the file is reached, like this: (X=2 in example)
line 1 word
line 2
line 3 word
line 4
line 5 word
line 6
line 7 word
.
.
.
line N
N is of the order of 100000. With the program I made (using sed) I had to wait for about 15 minutes to finish. I'm sure there is a much quicker way to do it.