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.