> -----Original Message----- > From: [email protected] [mailto:rsyslog- > [email protected]] On Behalf Of Radu Gheorghe > Sent: Tuesday, September 11, 2012 5:40 PM > To: rsyslog-users > Subject: [rsyslog] How to escape backslash in rainerscript if...then > conditions > > Hi to all rsysloggers :) > > If I want to configure my rsyslog 6.4.1 to do something like: > > if $msg contains '|\/|onster' then /var/log/monster > > it fails giving something like: > 7434.868138334:7fbd708fd700: invalid char in expr: ' > 7434.868146274:7fbd708fd700: XXXX: msg: syntax error > > I get the same error if I use a double-backslash there: > > if $msg contains '|\\/|onster' then /var/log/monster > > So my question is: how to escape the backslash and avoid the syntax > error?
It looks like I really overlooked that... Besides, escapes other than \' are currently not supported. The good thing probably is that this means I can introduce them without breaking anything, simply because that was already broken all the time ;) I keep you posted, need to dig a bit more into it... Rainer > > Any clues will be deeply appreciated :) > > Thanks and best regards, > Radu > _______________________________________________ > 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 _______________________________________________ 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.

