'How to escape double quotes in monit config file?
I'm using monit on ubuntu to monitor my server and my plan is that monit alerts me via e-mail if special events occur. The problem is that i have to define a password that contains a double quote. Passwords with special characters have to be surrounded by double quotes (not single quotes) that interfere with the one of the password. Is there any way to escape this?
set mailserver
smtp.example.com
port 465
username [email protected]
password "ex"ample" # password should be ex"ample, this and ex\"ample dont work
using SSL
Solution 1:[1]
You can encode a double quote in monit config as its hexadecimal ASCII: \0x22
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | richardec |
