From c90dd3c948939640de68ebafd9f7d81c12d899f0 Mon Sep 17 00:00:00 2001 From: koalaman Date: Wed, 13 May 2015 11:51:21 -0700 Subject: [PATCH] Updated SC2082 (markdown) --- SC2082.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SC2082.md b/SC2082.md index f955ad8..1a6fe03 100644 --- a/SC2082.md +++ b/SC2082.md @@ -15,9 +15,9 @@ ### Rationale: -You can expand a variable `var_1` with `${var_1}`, but you can not generate the string `var_1` with an embedded expansion, like `var_$n`. Instead, you have to use an indirect reference. +You can expand a variable `var_1` with `${var_1}`, but you can not generate the string `var_1` with an embedded expansion, like `${var_$n}`. Instead, you have to use an indirect reference. -You can do this by creating a variable containing the variable name you want, e.g. `myvar="var_$n"` and then expanding it indirectly with `${!myvar}`. This will give the contents of the variable `var_1`. +You do this by creating a variable containing the variable name you want, e.g. `myvar="var_$n"` and then expanding it indirectly with `${!myvar}`. This will give the contents of the variable `var_1`. ### Exceptions: