1
Finished Programs / SOLVED: Insert text string to front / end of each line in a text file
« on: July 22, 2012, 06:13 AM »
Hello all.
I have a request for a small program or script to insert text to the front and end of each line within a next .txt file. Or any ideas if there's a program already for this, I'm not having any lucky finding one.
Say I have a bunch of lines of text eg...
ONE
TWO
THREE
Then I want to append text to either side of each line of text. So I want "BEFORE" to go in front, and "AFTER" at the end. Eg
BEFORE ONE AFTER
BEFORE TWO AFTER
BEFORE THREE AFTER
Here's an example of how I want to use it with image tags:
So each line has a new URL (but they don't always start the http://), something like this:
http.://img.01.jpg
http.://img.02.jpg
Gets tags on either side like this:
<img src="http.://img.01.jpg">
<img src="http.://img.02.jpg">
I have a request for a small program or script to insert text to the front and end of each line within a next .txt file. Or any ideas if there's a program already for this, I'm not having any lucky finding one.
Say I have a bunch of lines of text eg...
ONE
TWO
THREE
Then I want to append text to either side of each line of text. So I want "BEFORE" to go in front, and "AFTER" at the end. Eg
BEFORE ONE AFTER
BEFORE TWO AFTER
BEFORE THREE AFTER
Here's an example of how I want to use it with image tags:
So each line has a new URL (but they don't always start the http://), something like this:
http.://img.01.jpg
http.://img.02.jpg
Gets tags on either side like this:
<img src="http.://img.01.jpg">
<img src="http.://img.02.jpg">