monit-general
[Top][All Lists]
Advanced

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

Re: Path and argument problem... solution?


From: Jan-Henrik Haukeland
Subject: Re: Path and argument problem... solution?
Date: 31 Aug 2002 15:37:35 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

Christian Hopp <address@hidden> writes:

> > Try with "'text'" I do get text'"  :)
> 
> S***, a missing break. )-: Fixed.

Aha, I just saw there was an error but didn't know what you was aiming
for. Now I do. Yeah, I guess this is better in that only the two outer
quotes are stripped instead of all outer quotes. That way you will
strip this text correctly "text 'subtext'" -> text 'subtext'. Good work!

> If you need double quotes somewhere in your command, you need to "quote"
> them.  But we have to remove the outer quotes because you need it to give
> arguments with spaces from time to time but without quotes around it.
> Sounds confusing? |-:

No this is clear. And since we identify blocks and single quote it is
possible to use double quotes there. Like for instance:

  start program = "/bin/sh -c { echo "'$HOME'" } "
  start program = "/sbin/xyz start --names=' "joe" "fritz" "ola" ' "

> Another way would be... in case a user needs quotes in a command he/she
> has to escape them, but that needs that we "exclude" escaped quotes as
> delimiters.

Yes, that's the hard one and what I was thinking about, for instance
now you cannot do: 

   start program = "/sbin/xyz --directories="/tmp /home" "
   start program = "/sbin/xyz --directories=\"/tmp /home\" "

Instead you must use single quote:

   start program = "/sbin/xyz --directories='/tmp /home' "

But this is of minor importance, alltough a nuisance.

> +1 for a new dev list.

Okay, I see Rory also voted for this. I'll try to put up a new dev
list with automatic cvs mails in a short while then.

-- 
Jan-Henrik Haukeland




reply via email to

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