[rsyslog-notify] Forum Thread: Re: stop doesn't work - (Mode 'edit_last_post')

noreply at adiscon.com noreply at adiscon.com
Mon Nov 2 13:25:31 CET 2015


User: rgerhards 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=26088#p26088

Message: 
----------
You need to keep on your mind that you are specifying a constant string. If
you want to put a special character into a string, you need to escape it.
e.g to put " into the string, you cant just say "a"b", as the " would
terminate the string. So you need to say "a\"b" where the backslash escapes
the ". But so you can't use \ purely, because it also has a special
meaning. So if you want to use it, you need to escape it as well. E.g.
"a\.b" does not work, because . is not a valid escape sequence. So you need
to say "a\\.b" in order to get a\.b. That's just like it is in any
programming or scripting language. So you need to apply string escaping to
the regex you want.

Basically this is the same with bash, but it seems to have some special
escaping rules, which "by accident" make your string working even though
you use \ (the escape character) in an unescaped way. 

Bottom line: use the string escaper link I posted.


More information about the rsyslog-notify mailing list