const

Table of Contents

CFEngine defines a number of variables for embedding unprintable values or values with special meanings in strings.

const.dollar

    reports:

       # This will report: The value of $(const.dollar) is $
       "The value of $(const.dollar)(const.dollar) is $(const.dollar)";

       # This will report: But the value of $(dollar) is $(dollar)
       "But the value of $(dollar) is $(dollar)";

const.dirsep

    reports:

       # On Unix hosts this will report: The value of $(const.dirsep) is /
       # On Windows hosts this will report: The value of $(const.dirsep) is \\
       "The value of $(const.dollar)(const.dirsep) is $(const.dirsep)";

const.endl

    reports:

      "A newline with either $(const.n) or with $(const.endl) is ok";
      "But a string with \n in it does not have a newline!";

const.n

    reports:

      "A newline with either $(const.n) or with $(const.endl) is ok";
      "But a string with \n in it does not have a newline!";

const.r

    reports:

      "A carriage return character is $(const.r)";

const.t

    reports:

      "A report with a$(const.t)tab in it";