diff --git a/SC1066.md b/SC1066.md index 5b9754b..57d69ff 100644 --- a/SC1066.md +++ b/SC1066.md @@ -20,10 +20,19 @@ declare "$name=hello world" echo "$foo" ``` +Or if you actually wanted to compare the value, use a test expression: + +```sh +if [ "$greeting" = "hello world" ] +then + echo "Programmer, I presume?" +fi +``` + ### Rationale: Unlike Perl or PHP, `$` is not used when assigning to a variable. ### Exceptions -None +If you wanted to