From 7c2ed4de976b1989aa3e7fb8e3995d92935d93d2 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 14 Jun 2018 14:36:57 +1000 Subject: [PATCH] docs: update --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index b34a698..693c59e 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,16 @@ rstrip() { ### Assign and access a variable using a variable. ```sh +# First Example. + +var1="world" +var2="hello_${var1}" +declare "${var2}=test_string" +printf '%s\n' "${!var2}" + + +# Second Example. + # Assign to a variable named after the # value stored in '$var'. var="test"