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.

Job Description

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

Other open jobs by this client