monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quoting or escaping when using exec


From: Moshe Cohen
Subject: Quoting or escaping when using exec
Date: Thu, 3 Mar 2011 21:03:35 +0200

Hi,
Let's say I want to have an exec action like this:

exec "/bin/bash -c 'mail -s "multi word subject" address@hidden ' "

This will not work because the quotes around the subject collide with the outer quotes.
I have tried several types of escaping these quotes or single quotes, but have't found the way to do it.
How can I escape quotes so the command is passed to the bash script properly?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]