diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-12 17:31:21 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-12 17:31:21 +0000 |
commit | 8fee5383eb214b7e4aa38b0438f23d2a326fb103 (patch) | |
tree | 3e947c7fb8c106ae3506c9bd64291bbe53c159c8 | |
parent | 8accd804cf816642248e935b0e4c7adcea291443 (diff) | |
download | puppet-8fee5383eb214b7e4aa38b0438f23d2a326fb103.tar.gz puppet-8fee5383eb214b7e4aa38b0438f23d2a326fb103.tar.xz puppet-8fee5383eb214b7e4aa38b0438f23d2a326fb103.zip |
Adding a short note on variable interpolation
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1910 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r-- | documentation/documentation/language/tutorial.page | 14 |
1 files changed, 14 insertions, 0 deletions
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 |