From cbaa83b4227593acde91d6600bb00260ddd3b1a8 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 7 Mar 2015 21:05:30 -0800 Subject: [PATCH] Updated SC2154 (markdown) --- SC2154.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SC2154.md b/SC2154.md index fb78b87..2b626f9 100644 --- a/SC2154.md +++ b/SC2154.md @@ -11,6 +11,10 @@ or target="world" echo "hello $tagret" # misspelled +or + + echo "Result: ${mycmd -a myfile}" # trying to execute commands + ### Correct code: var=name @@ -22,6 +26,10 @@ or target="world" echo "hello $target" +or + + echo "Result: $(mycmd -a myfile)" + ### 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.