Hi,

it aint our issue: we dont actually need to include escape chars into
strings, our need is - for example - to escape delimitators ( ", ' ) inside
command lines; in fact ,we're used to compose very complex tiny scripts with
subshells for the 'command' field into 'exec' resources, etc..

Please help,
greets,
Matteo

2011/2/9 Felix Frank <felix.fr...@alumni.tu-berlin.de>

> On 02/08/2011 04:09 PM, mt321_0987 wrote:
> > unfortunately, we keep getting this warns into the system log by
> > puppet masters:
> >
> > " [...] Unrecognised escape sequence '\<CHAR>' in file <PATH> [...] "
> >
> > but then everything works fine; also, without using escapes, catalogs
> > dont work on agents.
> > What can we do to avoid these kind of errors in master syslogs?
> >
> > Please ,let us know ASAP and tell us if this problem will prevent
> > remote execution in future versions, thanks
>
> If you have strings that include backslashes, you should really escape
> those backslashes, i.e.:
>
>  onlyif => "grep two\ words /tmp/file", # WRONG!
>
>  onlyif => "grep two\\ words /tmp/file", # right
>
> In some cases, you can use single quotes instead
>
>  onlyif => 'grep two\ words /tmp/file', # right too
>
> but you loose flexibility. I urge you to get your escapes right.
>
> HTH,
> Felix
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to