5

Tool to create text files from a template

view full story
linux-howto

http://unix.stackexchange.com – I have to regularly create 100+ text files from templates. I currently use an overly complicated shell script. I think there is a smarter way to handle this, but I don't know how. I have a "database" : # outputfile template data1 data2 data3 first.txt $template_main $text1 abcd 1234 second.txt $template_main $text2 efgh 5678 third.txt $template_other $text1 ij 90 And a configuration file : template_main=main.txt template_other=other.txt text1=whatever text2=blah The templates are text files with placeholders like (HowTos)