Go to the first, previous, next, last section, table of contents.


Quoted strings

In several cfengine commands, you use quoted strings to define a quantity of text which may contain spaces. For example


control:

  macro = ( "mycommand" )

editfiles:

  { $(HOME)/myfile

   AppendIfNoSuchLine 'This text contains space'
  }

In each case you may use any one of the three types of quote marks in order to delimit strings,


  ' or " or `

If you choose, say ", then you may not use this symbol within the string itself. The same goes for the other types of string delimiters. Unlike the shell, cfengine treats these three delimiters in precisely the same way. There is no difference between them. If you need to quote a quoted string, then you should choose a delimiter which does not conflict with the substring.

Note that you can use special variables for certain symbols in a string See section Variable substitution.


Go to the first, previous, next, last section, table of contents.