[geeks] using script to generate files from a template

William S. wstan at xs4all.nl
Sun Jun 16 05:03:14 CDT 2002


Can anyone suggest a script that will enable me to generate
multiple files based on a template? Each file would have a different
filename designated in a list and insert specific strings into
each file. For example:

Template file: template.txt

	This file contains information about
	<city>. This city is very <size>.

Structure file: structure.csv (filename,city,size)

	boston.php,boston,big
	lawrence.php,lawrence,small
	wolfeboro.php,wolfeboro,tiny

So, the result would be three files with different
content based on what is specified in the structure.csv.

Thank you,
	
-- 
Bill
Amsterdam, NL



More information about the geeks mailing list