diff --git a/SC2116.md b/SC2116.md index 49de839..43387b4 100644 --- a/SC2116.md +++ b/SC2116.md @@ -25,7 +25,7 @@ You can just replace `$(echo myvalue)` with `myvalue`. ### Exceptions Sometimes this pattern is used because of side effect of `echo` or expansions. For example, here `$(echo ..)` is used to expand a glob. -``` +```sh glob="*.png" files="$(echo $var)" ``` @@ -39,7 +39,7 @@ The `echo` is not useless, but this code is problematic because it concatenates All three methods will let you avoid issues with special characters in filenames. As another example, here `$(echo ..)` is used to expand escape sequences: -``` +```sh unexpanded='var\tvalue' expanded="$(echo "$var")" ```