====== Template_merge Version 1.05 ====== New features are added to [[:utils:template_merge]]. Go to the [[:download]] page to get it. If there are any issues open a bug report in the [[http://bugs.opennetadmin.com|bug tracker]]. This version adds the following: * Fixed issue when no -p option is given, it is not required * Made help text truely 80 characters wide * Cleanup of some help text * Fix to allow \n to work as newline in -s suffix option * New Feature: Implemented basic IF tests More info on the IF logic feature from the internal help page: $[if:{type}question:answer] ... $[endif] -- Displays the contents between the if and endif statements when the condition matches. The available types are parm, env, and dns. The result of "{type}question" should match the "answer". You can use the "notif" operator to negate the match. For the parm and env types you can leave the "answer" blank to test for the simple existence of the "question". You can also use simple regular expression matching in the "answer" field. Examples: $[if:{parm}SOME_NUM:1234] -- matches if the parm SOME_NUM was set to 1234 $[if:{env}USER:mdp] -- matches if the environment var USER is set to mdp $[if:{dns}google.com:64.233.187.99] -- matches if google.com resolves to ip address 64.233.187.99. (Will match any, if multiple IPs are returned) $[notif:{parm}ABCD:1234] -- matches if the parm ABCD was NOT set to 1234 $[if:{parm}ABCD:] -- matches if the parm ABCD exists, no matter its value $[if:{env}PATH:.*:/usr/bin:.*] -- Checks that /usr/bin/ is in the PATH