From 70178a5291b8fbe868d068d83a4f76cfe2af4992 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 7 Mar 2015 19:25:12 -0800 Subject: [PATCH] Updated SC2154 (markdown) --- SC2154.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/SC2154.md b/SC2154.md index 8dd8f64..fb78b87 100644 --- a/SC2154.md +++ b/SC2154.md @@ -4,7 +4,12 @@ var=name n=42 - echo "$var_$n.jpg" + echo "$var_$n.jpg" # overextended + +or + + target="world" + echo "hello $tagret" # misspelled ### Correct code: @@ -12,6 +17,11 @@ n=42 echo "${var}_$n.jpg" +or + + target="world" + echo "hello $target" + ### Rationale: ShellCheck has noticed that you reference a variable that is not assigned. Double check that the variable is indeed assigned, and that the name is not misspelled.