Updated SC2116 (markdown)

Eisuke Kawashima
2025-07-29 20:48:08 +09:00
parent 4c193fb2bb
commit 3f9c06b6b3

@@ -25,7 +25,7 @@ You can just replace `$(echo myvalue)` with `myvalue`.
### Exceptions ### Exceptions
Sometimes this pattern is used because of side effect of `echo` or expansions. For example, here `$(echo ..)` is used to expand a glob. 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" glob="*.png"
files="$(echo $var)" 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. All three methods will let you avoid issues with special characters in filenames.
As another example, here `$(echo ..)` is used to expand escape sequences: As another example, here `$(echo ..)` is used to expand escape sequences:
``` ```sh
unexpanded='var\tvalue' unexpanded='var\tvalue'
expanded="$(echo "$var")" expanded="$(echo "$var")"
``` ```