Just a variantion of Nakarin's answer - if you wanted the end result to become:

access example "usm auth exact all none none"

then the correct escaping would be

"snmp2" string =>  "access example \"usm auth exact all none none\"";

- Erlend
On 15 March 2010 10:57, Nakarin Phooripoom <mynameisje...@gmail.com> wrote:
>
> Simply add backslash (\) right in front of the inner quotation marks.
>
> "snmp2" string =>  "access example \"\" usm auth exact all none none";
>
> Cheers,
> --Nakarin
>
> On Mar 15, 2010, at 10:47 AM, Patrick de Ruiter wrote:
>
> > Hi Guys,
> >
> > I'm currently strugling with the problem of  escaping double quotes in a 
> > string.
> >
> >    vars:
> >       linux.!redhat_s_4::
> >         "snmp1" string => "group example usm example";
> >         "snmp2" string =>  "access example "" usm auth exact all none 
> > none"; # THIS IS THE CULPRIT
> >         "snmp3" string => "view all included .1 80";
> >
> >
> > Please advice,
> >
> > Regards,
> > Patrick
> > _______________________________________________
> > Help-cfengine mailing list
> > Help-cfengine@cfengine.org
> > https://cfengine.org/mailman/listinfo/help-cfengine
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to