bash script to generate config or property file from a template file containing variables

Sometimes we have configuration or properties file (as templates) such as httpd.conf or server.conf where we want to dynamically replace $variables with values before writing the output to a new file. Example: # httpd.conf.tmpl SetHandler server-status Order deny,allow Deny from all Allow from $MONITOR_IP We want to develop an install script in Bash such that it reads the httpd.conf.tmpl and replaces the $STATUS_URI and $MONITOR_IP with appropriate values (either passed in as script arguments or coded in the bash script) and then write out the resulting output to a new file such as /tmp/httpd.

Grails - Adding JavaScript to bottom of page

In Grails using the templating (Sitemesh) if you were to include per-page JavaScript resources then it shows up much earlier in the layout content as part of the Here is an example illustrating the problem: SamplePage.gsp [sourcecode language=“html”] <!DOCTYPE html> MyThinkPond.com Custom Page … Some this page content [/sourcecode] and the layout page (layoutPage.gsp) [sourcecode language=“html”] <!DOCTYPE html> … Some template (header) content