- edited description
Document how to escape double quotes
Issue #1006
closed
It seems unclear from the documentation how to escape double quotes within strings. I tried \” but it doesn’t work. \0x22 seems to work, but I wonder if there’s a simpler syntax? I think it could be a good addition to the manual to document how to escape them.
At least one other person has had the same question:
https://stackoverflow.com/questions/67721997/how-to-escape-double-quotes-in-monit-config-file
Comments (6)
-
reporter -
repo owner Did you try single quotes? Something like:
set mailserver smtp.example.com port 465 username example@provider.com password 'ex"ample' using SSL
-
I also wonder how to use arguments with spaces in
check program
path
. None of these works:'/bin/sh -c "env >/tmp/test"'
"/bin/sh -c \0x22env >/tmp/test\0x22"
"/bin/sh -c \"env >/tmp/test\""
-
repo owner Try “
/bin/sh -c 'env >/tmp/test'”
-
@Tildeslash it works, thank you.
-
repo owner - changed status to closed
- Log in to comment