Re: [Puppet Users] Unrecognised escape sequence '\[' in file

2014-08-27 Thread Wil Cooley
On Wed, Aug 27, 2014 at 8:24 AM, Brian Wilkins wrote: > Have you tried with two backslashes '\\' ? >> > > Ah, that was it :) > An alternative is to "quote" the bracket by making it a character class: "[[]" I used to like this for some reason, but I cannot quite remember why now; it certainly is

Re: [Puppet Users] Unrecognised escape sequence '\[' in file

2014-08-27 Thread Brian Wilkins
> > Have you tried with two backslashes '\\' ? > Ah, that was it :) Also, but why not manage multiple files in /etc/nagios/nrpe.d/ based on > templates instead of managing a single file, since that's much trickier? > Oh, that is how I am doing it (sort of): class profiles::nagios_resource::

Re: [Puppet Users] Unrecognised escape sequence '\[' in file

2014-08-27 Thread Matthias Saou
On Wed, 27 Aug 2014 05:31:39 -0700 (PDT) Brian Wilkins wrote: > I am having to escape a regular expression in my match and puppet > complains on the puppetmaster of an "Unrecognised escape sequence". > How do I fix this so the logs don't get cluttered with this message? > I am using Puppet 3.6.2.

[Puppet Users] Unrecognised escape sequence '\[' in file

2014-08-27 Thread Brian Wilkins
I am having to escape a regular expression in my match and puppet complains on the puppetmaster of an "Unrecognised escape sequence". How do I fix this so the logs don't get cluttered with this message? I am using Puppet 3.6.2. file_line { "nagios_monitor_check_${title}": path => '/etc/na

Re: [Puppet Users] Unrecognised escape sequence '\~'

2010-12-28 Thread Martijn Grendelman
On 27-12-10 15:05, Felix Frank wrote: > On 12/27/2010 02:54 PM, Martijn Grendelman wrote: >> Hi, In one of my modules, I have the following: exec { "/bin/sed -i '\~^${line}$~d' '${file}'": The '\~' is there, to make sed use '~' as the command separator instead of '/'

Re: [Puppet Users] Unrecognised escape sequence '\~'

2010-12-27 Thread Felix Frank
On 12/27/2010 02:54 PM, Martijn Grendelman wrote: > Hi, >>> In one of my modules, I have the following: >>> >>> exec { "/bin/sed -i '\~^${line}$~d' '${file}'": >>> >>> The '\~' is there, to make sed use '~' as the command separator instead of >>> '/', which is too common in the lines I am trying

Re: [Puppet Users] Unrecognised escape sequence '\~'

2010-12-27 Thread Martijn Grendelman
Hi, >> In one of my modules, I have the following: >> >> exec { "/bin/sed -i '\~^${line}$~d' '${file}'": >> >> The '\~' is there, to make sed use '~' as the command separator instead of >> '/', which is too common in the lines I am trying to delete. >> >> However, the puppet master now complains:

Re: [Puppet Users] Unrecognised escape sequence '\~'

2010-12-27 Thread Felix Frank
On 12/27/2010 02:13 PM, Martijn Grendelman wrote: > Hi, > > In one of my modules, I have the following: > > exec { "/bin/sed -i '\~^${line}$~d' '${file}'": > > The '\~' is there, to make sed use '~' as the command separator instead of > '/', which is too common in the lines I am trying to dele

[Puppet Users] Unrecognised escape sequence '\~'

2010-12-27 Thread Martijn Grendelman
Hi, In one of my modules, I have the following: exec { "/bin/sed -i '\~^${line}$~d' '${file}'": The '\~' is there, to make sed use '~' as the command separator instead of '/', which is too common in the lines I am trying to delete. However, the puppet master now complains: Dec 27 14:07:11 of