From 8fee5383eb214b7e4aa38b0438f23d2a326fb103 Mon Sep 17 00:00:00 2001 From: luke Date: Tue, 12 Dec 2006 17:31:21 +0000 Subject: Adding a short note on variable interpolation git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1910 980ebf18-57e1-0310-9a29-db15c13687c0 --- documentation/documentation/language/tutorial.page | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/documentation/documentation/language/tutorial.page b/documentation/documentation/language/tutorial.page index ca3529e1f..461c92e70 100644 --- a/documentation/documentation/language/tutorial.page +++ b/documentation/documentation/language/tutorial.page @@ -100,6 +100,20 @@ the builtin [conditionals](structures.html#conditionals): This is only one assignment, so no errors. +## Variable Interpolation + +Variables will get interpolated within double-quoted strings by default. You +can disable the interpolation by escaping the dollar sign: + + $str = "A string with a \$dollar sign in it" + +During interpolation, you can also surround your variable with curly braces if +necessary: + + $a = "something" + $b = "else" + $c = "${a}_${b}" + # Fact Variables (facts) In addition to variables that are manually assigned (as above), `puppet` also -- cgit