So to set a variable, you must use $! where in bash a $ is all that's needed? How do you interpret this:
set $!usr!level2!var1 = "test"; set $!usr!level2!var1 = $msg; # update variable with native MSG field What's the purpose of the ! between usr and level2? Based on your response the name of the variable is "usr!level2!var1". Is this a true statement? Is there somewhere that the scripting language syntax is detailed? Thanks again, John On Mon, Jan 25, 2016 at 4:58 PM, David Lang <[email protected]> wrote: > On Mon, 25 Jan 2016, John Tabasz wrote: > > *This is where I hope to build the logic to create a new subject line based >> on the message content. The below gives syntax errors. * >> >> *The flow is:* >> >> *If message contains 622001* >> >> * If field 1 contains "Adding" && field 12 contains "outside" * >> >> * build subject line "Adding route to Outside interface"* >> >> * else* >> >> * if field 1 contains "Removing" && field 12 contains "outside"* >> >> * build subject line "Removed route from Outside interface"* >> >> >> * else ...* >> >> *fi* >> *Send email with new subject line and $msg in body* >> >> if $msg contains '622001' then :ommail:;newMailSubject >> $template(name="addOrRemove" type="string" string="%msg:F,32:1%") >> set $AorR = exec_template("addOrRemove") >> > > this is wrong, you can create $!AorR, but not $AorR > > you also need to have a ; at the end of the line. > > $template(name="outOrBk" type="string" string="%msg:F,32:13%") >> set $intName = exec_template("outOrBk") >> $template newMailSubject, "'%HOSTNAME%' - '%TIMESTAMP%' - '%msg%' - >> '$AorR'" >> > > set $!AorR = exec_template("addOrRemove"); > $template(name="outOrBk" type="string" string="%msg:F,32:13%") > set $!intName = exec_template("outOrBk"); > $template newMailSubject, "'%HOSTNAME%' - '%TIMESTAMP%' - '%msg%' - > '$!AorR'" > > David Lang > > _______________________________________________ > rsyslog mailing list > http://lists.adiscon.net/mailman/listinfo/rsyslog > http://www.rsyslog.com/professional-services/ > What's up with rsyslog? Follow https://twitter.com/rgerhards > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad > of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you > DON'T LIKE THAT. > _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

