Script to append tags to the first line of every text file in a directory

Closed - This job posting has been filled and work has been completed.
Web, Mobile & Software Dev Scripts & Utilities Posted 3 years ago

Fixed Price

Budget: $5
Delivery by January 18, 2013

Start Date

January 17, 2013


I am looking for a simple batch script that when run will loop through and modify the first line in each text file present in the directory and save the file again. The script should append a tag before the line and after it.

So if one text file looks like this:

Hey, this is the title!

....blah...blah blah...content
....blah...blah blah...content
....blah...blah blah...content

The resaved file would look like:

[title]Hey, this is the title![/title]

....blah...blah blah...content
....blah...blah blah...content
....blah...blah blah...content

I'd prefer the script to be usable from windows if possible so .bat or vbs/powershell but a bash script that runs in gnuwin32  would do.

Skills: batch-scripting

About the Client

(5.00) 20 reviews

United Kingdom
Glasgow 03:09 AM

30 Jobs Posted
80% Hire Rate, 1 Open Job

$1,095 Total Spent
25 Hires, 1 Active

$25.00/hr Avg Hourly Rate Paid
3 Hours

Member Since Aug 10, 2011