Double-quoted strings

Strings can be surrounded by double quotation marks, "like this".

Line breaks within the string are interpreted as literal line breaks. You can also insert line breaks with \n (Unix-style) or \r\n (Windows-style).

Double-quoted strings can interpolate values. See Interpolation information below.

Escape sequences

The following escape sequences are available in double-quoted strings:

SequenceResult
\\Single backslash
\nNew line
\rCarriage return
\tTab
\sSpace
\$Literal dollar sign (to prevent interpolation)
\uXXXXUnicode character number XXXX (a four-digit hexadecimal number)
\u{XXXXXX}Unicode character XXXXXX (a hexadecimal number between two and six digits)
\"Literal double quotation mark
\'Literal single quotation mark

Within double quotation marks, if a backslash is followed by any character other than those listed above (that is, a character that is not a recognized escape sequence), Puppet logs a warning: Warning: Unrecognized escape sequence, and treats it as a literal backslash.

A good habit is to always use two backslashes where you want the result to be one backslash.